use of org.apache.drill.exec.vector.accessor.writer.MapWriter.ArrayMapWriter in project drill by axbaretto.
the class ColumnWriterFactory method buildMapArray.
public static ArrayObjectWriter buildMapArray(ColumnMetadata schema, UInt4Vector offsetVector, List<AbstractObjectWriter> writers) {
MapWriter mapWriter;
if (schema.isProjected()) {
mapWriter = new ArrayMapWriter(schema, writers);
} else {
mapWriter = new DummyArrayMapWriter(schema, writers);
}
TupleObjectWriter mapArray = new TupleObjectWriter(schema, mapWriter);
AbstractArrayWriter arrayWriter;
if (schema.isProjected()) {
arrayWriter = new ObjectArrayWriter(offsetVector, mapArray);
} else {
arrayWriter = new DummyArrayWriter(mapArray);
}
return new ArrayObjectWriter(schema, arrayWriter);
}
Also used :
ArrayMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.ArrayMapWriter)
DummyArrayMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyArrayMapWriter)
SingleMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.SingleMapWriter)
DummyMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyMapWriter)
DummyArrayWriter(org.apache.drill.exec.vector.accessor.writer.dummy.DummyArrayWriter)
ArrayObjectWriter(org.apache.drill.exec.vector.accessor.writer.AbstractArrayWriter.ArrayObjectWriter)
ArrayMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.ArrayMapWriter)
DummyArrayMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyArrayMapWriter)
DummyArrayMapWriter(org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyArrayMapWriter)
TupleObjectWriter(org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter.TupleObjectWriter)