use of org.apache.drill.exec.vector.accessor.writer.dummy.DummyArrayWriter 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);
}
use of org.apache.drill.exec.vector.accessor.writer.dummy.DummyArrayWriter in project drill by apache.
the class ObjectDictWriter method buildDictArray.
public static ArrayObjectWriter buildDictArray(ColumnMetadata metadata, RepeatedDictVector vector, List<AbstractObjectWriter> keyValueWriters) {
final DictVector dataVector;
if (vector != null) {
dataVector = (DictVector) vector.getDataVector();
} else {
dataVector = null;
}
ObjectDictWriter.DictObjectWriter dictWriter = buildDict(metadata, dataVector, keyValueWriters);
AbstractArrayWriter arrayWriter;
if (vector != null) {
arrayWriter = new ObjectArrayWriter(metadata, vector.getOffsetVector(), dictWriter);
} else {
arrayWriter = new DummyArrayWriter(metadata, dictWriter);
}
return new ArrayObjectWriter(arrayWriter);
}
use of org.apache.drill.exec.vector.accessor.writer.dummy.DummyArrayWriter in project drill by apache.
the class MapWriter method buildMapArray.
public static ArrayObjectWriter buildMapArray(ColumnMetadata schema, RepeatedMapVector mapVector, List<AbstractObjectWriter> writers) {
MapWriter mapWriter;
if (mapVector != null) {
mapWriter = new ArrayMapWriter(schema, writers);
} else {
mapWriter = new DummyArrayMapWriter(schema, writers);
}
TupleObjectWriter mapArray = new TupleObjectWriter(mapWriter);
AbstractArrayWriter arrayWriter;
if (mapVector != null) {
arrayWriter = new ObjectArrayWriter(schema, mapVector.getOffsetVector(), mapArray);
} else {
arrayWriter = new DummyArrayWriter(schema, mapArray);
}
return new ArrayObjectWriter(arrayWriter);
}
Aggregations