public class AvroGenericRecordToRowDataMapper
extends java.lang.Object
implements org.apache.flink.api.common.functions.MapFunction<org.apache.avro.generic.GenericRecord,org.apache.flink.table.data.RowData>
AvroToRowDataConverters
. Because of the precision difference
between how Iceberg schema (micro) and Flink AvroToRowDataConverters
(milli) deal with
time type, we can't directly use the Avro Schema converted from Iceberg schema via AvroSchemaUtil.convert(org.apache.iceberg.Schema, String)
.Modifier and Type | Method and Description |
---|---|
static AvroGenericRecordToRowDataMapper |
forAvroSchema(org.apache.avro.Schema avroSchema)
Create a mapper based on Avro schema.
|
org.apache.flink.table.data.RowData |
map(org.apache.avro.generic.GenericRecord genericRecord) |
public org.apache.flink.table.data.RowData map(org.apache.avro.generic.GenericRecord genericRecord) throws java.lang.Exception
map
in interface org.apache.flink.api.common.functions.MapFunction<org.apache.avro.generic.GenericRecord,org.apache.flink.table.data.RowData>
java.lang.Exception
public static AvroGenericRecordToRowDataMapper forAvroSchema(org.apache.avro.Schema avroSchema)