Class MapWriter.SingleMapWriter
java.lang.Object
org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter
org.apache.drill.exec.vector.accessor.writer.MapWriter
org.apache.drill.exec.vector.accessor.writer.MapWriter.SingleMapWriter
- All Implemented Interfaces:
ColumnWriter
,TupleWriter
,WriterEvents
,WriterPosition
- Enclosing class:
- MapWriter
Writer for a single (non-array) map. Clients don't really "write" maps;
rather, this writer is a holder for the columns within the map, and those
columns are what is written.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.writer.MapWriter
MapWriter.ArrayMapWriter, MapWriter.DummyArrayMapWriter, MapWriter.DummyMapWriter, MapWriter.SingleMapWriter
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter
AbstractTupleWriter.TupleObjectWriter, AbstractTupleWriter.TupleWriterListener
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.accessor.TupleWriter
TupleWriter.UndefinedColumnException
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.accessor.writer.WriterEvents
WriterEvents.ColumnWriterListener, WriterEvents.State
-
Field Summary
Fields inherited from class org.apache.drill.exec.vector.accessor.writer.MapWriter
mapColumnSchema
Fields inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter
childIndex, listener, logger, state, tupleSchema, vectorIndex, writers
-
Constructor Summary
ModifierConstructorDescriptionprotected
SingleMapWriter
(ColumnMetadata schema, MapVector vector, List<AbstractObjectWriter> writers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
endWrite()
End a batch: finalize any vector values.boolean
Whether this writer is projected (is backed by a materialized vector), or is unprojected (is just a dummy writer.) In most cases, clients can ignore whether the column is projected and just write to the writer.void
The vectors backing this vector are about to roll over.Methods inherited from class org.apache.drill.exec.vector.accessor.writer.MapWriter
buildMap, buildMapArray, buildMapWriter, buildMapWriter, schema
Methods inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractTupleWriter
addColumn, addColumn, addColumnWriter, array, array, bindIndex, bindIndex, bindListener, bindListener, column, column, copy, dict, dict, dump, endArrayValue, isProjected, lastWriteIndex, listener, nullable, postRollover, restartRow, rowStartIndex, saveRow, scalar, scalar, set, setNull, setObject, size, startRow, startWrite, tuple, tuple, tupleSchema, type, type, type, variant, variant, writeIndex
-
Constructor Details
-
SingleMapWriter
protected SingleMapWriter(ColumnMetadata schema, MapVector vector, List<AbstractObjectWriter> writers)
-
-
Method Details
-
endWrite
public void endWrite()Description copied from interface:WriterEvents
End a batch: finalize any vector values.- Specified by:
endWrite
in interfaceWriterEvents
- Overrides:
endWrite
in classAbstractTupleWriter
-
preRollover
public void preRollover()Description copied from interface:WriterEvents
The vectors backing this vector are about to roll over. Finish the current batch up to, but not including, the current row.- Specified by:
preRollover
in interfaceWriterEvents
- Overrides:
preRollover
in classAbstractTupleWriter
-
isProjected
public boolean isProjected()Description copied from interface:ColumnWriter
Whether this writer is projected (is backed by a materialized vector), or is unprojected (is just a dummy writer.) In most cases, clients can ignore whether the column is projected and just write to the writer. This flag handles those special cases where it is helpful to know if the column is projected or not.- Specified by:
isProjected
in interfaceColumnWriter
- Overrides:
isProjected
in classAbstractTupleWriter
-