Class UnionState
java.lang.Object
org.apache.drill.exec.physical.resultSet.impl.ContainerState
org.apache.drill.exec.physical.resultSet.impl.UnionState
- All Implemented Interfaces:
VariantWriter.VariantWriterListener
Represents the contents of a union vector (or a pseudo-union for lists).
Holds the column states for the "columns" that make up the type members
of the union, and implements the writer callbacks to add members to
a union. This class is used when a column is a (single, non-repeated)
UNION. See the
ListState for when the union is used inside
a LIST (repeated union) type.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnion or list (repeated union) column state.static classVector wrapper for a union vector. -
Field Summary
Fields inherited from class org.apache.drill.exec.physical.resultSet.impl.ContainerState
loader, parentColumn, projectionSet, vectorCache -
Constructor Summary
ConstructorsConstructorDescriptionUnionState(org.apache.drill.exec.physical.resultSet.impl.LoaderInternals events, ResultVectorCache vectorCache, ProjectionFilter projectionSet) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddColumn(ColumnState colState) addMember(ColumnMetadata member) addType(TypeProtos.MinorType type) protected Collection<ColumnState> intprotected booleanReports whether this container is subject to version management.vector()writer()Methods inherited from class org.apache.drill.exec.physical.resultSet.impl.ContainerState
addColumn, bindColumnState, close, harvestWithLookAhead, loader, projection, rollover, startBatch, updateCardinality, vectorCache
-
Constructor Details
-
UnionState
public UnionState(org.apache.drill.exec.physical.resultSet.impl.LoaderInternals events, ResultVectorCache vectorCache, ProjectionFilter projectionSet)
-
-
Method Details
-
writer
-
variantSchema
-
vector
-
addType
- Specified by:
addTypein interfaceVariantWriter.VariantWriterListener
-
addMember
- Specified by:
addMemberin interfaceVariantWriter.VariantWriterListener
-
addColumn
- Specified by:
addColumnin classContainerState
-
columnStates
- Specified by:
columnStatesin classContainerState
-
innerCardinality
public int innerCardinality()- Specified by:
innerCardinalityin classContainerState
-
isVersioned
protected boolean isVersioned()Description copied from class:ContainerStateReports whether this container is subject to version management. Version management adds columns to the output container at harvest time based on whether they should appear in the output batch.- Specified by:
isVersionedin classContainerState- Returns:
trueif versioned
-