Package org.apache.drill.exec.store.avro
Class AvroColumnConverterFactory
java.lang.Object
org.apache.drill.exec.record.ColumnConverterFactory
org.apache.drill.exec.store.avro.AvroColumnConverterFactory
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Converts and writes all map children using providedAvroColumnConverterFactory.MapColumnConverter.converters
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildMapMembers
(org.apache.avro.generic.GenericRecord genericRecord, TupleMetadata providedSchema, TupleWriter tupleWriter, List<ColumnConverter> converters) buildScalar
(ColumnMetadata readerSchema, ValueWriter writer) protected ColumnConverter
getMapConverter
(TupleMetadata providedSchema, TupleMetadata readerSchema, TupleWriter tupleWriter) Based on provided schema, given converted Avro schema and current row writer generates list of column converters based on column type forAvroColumnConverterFactory.MapColumnConverter
and returns it.initConverters
(TupleMetadata providedSchema, TupleMetadata readerSchema, RowSetLoader rowWriter) Based on given converted Avro schema and current row writer generates list of column converters based on column type.Methods inherited from class org.apache.drill.exec.record.ColumnConverterFactory
getConverter, getRootConverter
-
Constructor Details
-
AvroColumnConverterFactory
-
-
Method Details
-
initConverters
public List<ColumnConverter> initConverters(TupleMetadata providedSchema, TupleMetadata readerSchema, RowSetLoader rowWriter) Based on given converted Avro schema and current row writer generates list of column converters based on column type.- Parameters:
readerSchema
- converted Avro schemarowWriter
- current row writer- Returns:
- list of column converters
-
buildScalar
public ColumnConverter.ScalarColumnConverter buildScalar(ColumnMetadata readerSchema, ValueWriter writer) - Overrides:
buildScalar
in classColumnConverterFactory
-
getMapConverter
protected ColumnConverter getMapConverter(TupleMetadata providedSchema, TupleMetadata readerSchema, TupleWriter tupleWriter) Based on provided schema, given converted Avro schema and current row writer generates list of column converters based on column type forAvroColumnConverterFactory.MapColumnConverter
and returns it.- Overrides:
getMapConverter
in classColumnConverterFactory
- Parameters:
providedSchema
- provided schemareaderSchema
- converted Avro schematupleWriter
- current row writer- Returns:
AvroColumnConverterFactory.MapColumnConverter
with column converters
-
buildMapMembers
public void buildMapMembers(org.apache.avro.generic.GenericRecord genericRecord, TupleMetadata providedSchema, TupleWriter tupleWriter, List<ColumnConverter> converters)
-