Package org.apache.druid.segment.nested
Class VariantColumn.VariantVectorObjectSelector
java.lang.Object
org.apache.druid.segment.nested.VariantColumn.VariantVectorObjectSelector
- All Implemented Interfaces:
VectorObjectSelector,VectorSizeInspector
- Enclosing class:
- VariantColumn<TStringDictionary extends Indexed<ByteBuffer>>
public abstract static class VariantColumn.VariantVectorObjectSelector
extends Object
implements VectorObjectSelector
Make a
VectorObjectSelector for a dictionary encoded column that coerces mixed types to a common type-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVariantVectorObjectSelector(ReadableVectorOffset offset, ColumnarInts encodedValueColumn, FrontCodedIntArrayIndexed arrayDictionary, ExpressionType logicalExpressionType, int adjustArrayId) -
Method Summary
Modifier and TypeMethodDescriptionabstract intadjustDictionaryId(int id) intReturns the current vector size for this cursor.intReturns the maximum vector size for this cursor.Object[]Get the current vector.abstract ObjectlookupScalarValue(int dictionaryId) abstract ObjectlookupScalarValueAndCast(int dictionaryId)
-
Constructor Details
-
VariantVectorObjectSelector
protected VariantVectorObjectSelector(ReadableVectorOffset offset, ColumnarInts encodedValueColumn, FrontCodedIntArrayIndexed arrayDictionary, ExpressionType logicalExpressionType, int adjustArrayId)
-
-
Method Details
-
adjustDictionaryId
public abstract int adjustDictionaryId(int id) -
lookupScalarValue
-
lookupScalarValueAndCast
-
getObjectVector
Description copied from interface:VectorObjectSelectorGet the current vector. The type of objects in the array depends on the type of the selector. Callers can determine this by callingVectorColumnSelectorFactory.getColumnCapabilities(String)if creating selectors directly. Alternatively, callers usingVectorColumnProcessorFactorywill receive capabilities as part of the callback toVectorColumnProcessorFactory.makeObjectProcessor(ColumnCapabilities, VectorObjectSelector). String selectors, where type isColumnType.STRING, must use objects compatible with the spec ofDimensionSelector.rowToObject(IndexedInts, DimensionDictionarySelector). Array selectors, whereTypeSignature.isArray(), must useObject[]. The array may contain null elements, and the array itself may also be null. Complex selectors may use any type of object. No other type of selector is possible. Vector object selectors are only used for strings, arrays, and complex types.- Specified by:
getObjectVectorin interfaceVectorObjectSelector
-
getMaxVectorSize
public int getMaxVectorSize()Description copied from interface:VectorSizeInspectorReturns the maximum vector size for this cursor. It will not change for the lifetime of this cursor, and is generally used to allocate scratch arrays for later processing. Will always be greater than zero.- Specified by:
getMaxVectorSizein interfaceVectorSizeInspector
-
getCurrentVectorSize
public int getCurrentVectorSize()Description copied from interface:VectorSizeInspectorReturns the current vector size for this cursor. Will never be larger than the max size returned byVectorSizeInspector.getMaxVectorSize().- Specified by:
getCurrentVectorSizein interfaceVectorSizeInspector
-