Class ColumnState.PrimitiveColumnState
java.lang.Object
org.apache.drill.exec.physical.resultSet.impl.ColumnState
org.apache.drill.exec.physical.resultSet.impl.ColumnState.PrimitiveColumnState
- All Implemented Interfaces:
WriterEvents.ColumnWriterListener
- Enclosing class:
- ColumnState
public static class ColumnState.PrimitiveColumnState
extends ColumnState
implements WriterEvents.ColumnWriterListener
Primitive (non-map) column state. Handles all three cardinalities.
Column metadata is hosted on the writer.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.physical.resultSet.impl.ColumnState
ColumnState.BaseContainerColumnState, ColumnState.PrimitiveColumnState, ColumnState.State
-
Field Summary
Fields inherited from class org.apache.drill.exec.physical.resultSet.impl.ColumnState
addVersion, cardinality, loader, outputIndex, state, vectorState, writer
-
Constructor Summary
ConstructorDescriptionPrimitiveColumnState
(org.apache.drill.exec.physical.resultSet.impl.LoaderInternals loader, AbstractObjectWriter colWriter, VectorState vectorState) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canExpand
(ScalarWriter writer, int delta) A writer wants to expand its vector.void
dump
(HierarchicalFormatter format) Get the output schema.void
overflowed
(ScalarWriter writer) Alert the listener that a vector has overflowed.Methods inherited from class org.apache.drill.exec.physical.resultSet.impl.ColumnState
allocateVectors, buildOutput, close, harvestWithLookAhead, innerCardinality, isProjected, outerCardinality, rollover, schema, startBatch, updateCardinality, vector, vectorState, writer
-
Constructor Details
-
PrimitiveColumnState
public PrimitiveColumnState(org.apache.drill.exec.physical.resultSet.impl.LoaderInternals loader, AbstractObjectWriter colWriter, VectorState vectorState)
-
-
Method Details
-
canExpand
Description copied from interface:WriterEvents.ColumnWriterListener
A writer wants to expand its vector. Allows the listener to either allow the growth, or trigger and overflow to limit batch size.- Specified by:
canExpand
in interfaceWriterEvents.ColumnWriterListener
- Parameters:
writer
- the writer that wishes to grow its vectordelta
- the amount by which the vector is to grow- Returns:
- true if the vector can be grown, false if the writer
should instead trigger an overflow by calling
overflowed()
-
overflowed
Description copied from interface:WriterEvents.ColumnWriterListener
Alert the listener that a vector has overflowed. Upon return, all writers must have a new set of buffers available, ready to accept the in-flight value that triggered the overflow.- Specified by:
overflowed
in interfaceWriterEvents.ColumnWriterListener
- Parameters:
writer
- the writer that triggered the overflow
-
outputSchema
Get the output schema. For a primitive (non-structured) column, the output schema is the same as the internal schema.- Specified by:
outputSchema
in classColumnState
-
dump
- Overrides:
dump
in classColumnState
-