@Experimental(value=SCHEMAS) public abstract class GetterBasedSchemaProvider extends java.lang.Object implements SchemaProvider
SchemaProvider
base class that vends schemas and rows based on FieldValueGetter
s.Constructor and Description |
---|
GetterBasedSchemaProvider() |
Modifier and Type | Method and Description |
---|---|
<T> SerializableFunction<Row,T> |
fromRowFunction(TypeDescriptor<T> typeDescriptor)
Given a type, returns a function that converts from a
Row object to that type. |
<T> 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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
schemaFor
public <T> SerializableFunction<T,Row> toRowFunction(TypeDescriptor<T> typeDescriptor)
SchemaProvider
Row
object If no schema
exists, returns null.toRowFunction
in interface SchemaProvider
public <T> SerializableFunction<Row,T> fromRowFunction(TypeDescriptor<T> typeDescriptor)
SchemaProvider
Row
object to that type. If no
schema exists, returns null.fromRowFunction
in interface SchemaProvider