@Experimental(value=SCHEMAS) public interface SchemaProvider extends java.io.Serializable
Schema
for a specific type. One example use: creating a SchemaProvider
that
contacts an external schema-registry service to determine the schema for a type.Modifier and Type | Method and Description |
---|---|
<T> @Nullable SerializableFunction<Row,T> |
fromRowFunction(TypeDescriptor<T> typeDescriptor)
Given a type, returns a function that converts from a
Row object to that type. |
<T> @Nullable Schema |
schemaFor(TypeDescriptor<T> typeDescriptor)
Lookup a schema for the given type.
|
<T> @Nullable SerializableFunction<T,Row> |
toRowFunction(TypeDescriptor<T> typeDescriptor)
Given a type, return a function that converts that type to a
Row object If no schema
exists, returns null. |
<T> @Nullable Schema schemaFor(TypeDescriptor<T> typeDescriptor)
<T> @Nullable SerializableFunction<T,Row> toRowFunction(TypeDescriptor<T> typeDescriptor)
Row
object If no schema
exists, returns null.<T> @Nullable SerializableFunction<Row,T> fromRowFunction(TypeDescriptor<T> typeDescriptor)
Row
object to that type. If no
schema exists, returns null.