Search in sources :

Example 1 with DummyArrayMapWriter

use of org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyArrayMapWriter 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)

Aggregations

ArrayObjectWriter (org.apache.drill.exec.vector.accessor.writer.AbstractArrayWriter.ArrayObjectWriter)1 TupleObjectWriter (org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter.TupleObjectWriter)1 ArrayMapWriter (org.apache.drill.exec.vector.accessor.writer.MapWriter.ArrayMapWriter)1 DummyArrayMapWriter (org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyArrayMapWriter)1 DummyMapWriter (org.apache.drill.exec.vector.accessor.writer.MapWriter.DummyMapWriter)1 SingleMapWriter (org.apache.drill.exec.vector.accessor.writer.MapWriter.SingleMapWriter)1 DummyArrayWriter (org.apache.drill.exec.vector.accessor.writer.dummy.DummyArrayWriter)1