public class AvroSchemaConverter extends Object
RowTypeInfo for representing
objects and converts Avro types into types that are compatible with Flink's Table & SQL API.
Note: Changes in this class need to be kept in sync with the corresponding runtime
classes AvroRowDeserializationSchema and AvroRowSerializationSchema.
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.apache.avro.specific.SpecificRecord> |
convertToTypeInfo(Class<T> avroClass)
Converts an Avro class into a nested row structure with deterministic field order and data
types that are compatible with Flink's Table & SQL API.
|
static <T> org.apache.flink.api.common.typeinfo.TypeInformation<T> |
convertToTypeInfo(String avroSchemaString)
Converts an Avro schema string into a nested row structure with deterministic field order and data
types that are compatible with Flink's Table & SQL API.
|
public static <T extends org.apache.avro.specific.SpecificRecord> org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> convertToTypeInfo(Class<T> avroClass)
avroClass - Avro specific record that contains schema informationpublic static <T> org.apache.flink.api.common.typeinfo.TypeInformation<T> convertToTypeInfo(String avroSchemaString)
avroSchemaString - Avro schema definition stringCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.