use of org.apache.drill.exec.record.ColumnConverter.ArrayColumnConverter in project drill by apache.
the class ColumnConverterFactory method getArrayConverter.
private ColumnConverter getArrayConverter(TupleMetadata providedSchema, ColumnMetadata readerSchema, ArrayWriter arrayWriter) {
ObjectWriter valueWriter = arrayWriter.entry();
ColumnConverter valueConverter;
if (readerSchema.isMap()) {
valueConverter = getMapConverter(providedSchema, readerSchema.tupleSchema(), valueWriter.tuple());
} else if (readerSchema.isDict()) {
valueConverter = getDictConverter(providedSchema, readerSchema.tupleSchema(), valueWriter.dict());
} else if (readerSchema.isMultiList()) {
valueConverter = getConverter(null, readerSchema.childSchema(), valueWriter);
} else {
valueConverter = getScalarConverter(readerSchema, valueWriter.scalar());
}
return new ArrayColumnConverter(arrayWriter, valueConverter);
}
Aggregations