Class StringUtf8DictionaryEncodedColumn.StringSingleValueDimensionVectorSelector
- java.lang.Object
-
- org.apache.druid.segment.column.StringUtf8DictionaryEncodedColumn.StringSingleValueDimensionVectorSelector
-
- All Implemented Interfaces:
DimensionDictionarySelector
,IdLookup
,SingleValueDimensionVectorSelector
,VectorSizeInspector
- Enclosing class:
- StringUtf8DictionaryEncodedColumn
public abstract static class StringUtf8DictionaryEncodedColumn.StringSingleValueDimensionVectorSelector extends Object implements SingleValueDimensionVectorSelector, IdLookup
Base type for aSingleValueDimensionVectorSelector
for a dictionary encodedColumnType.STRING
built around aColumnarInts
. Dictionary not included - BYO dictionary lookup methods. Assumes that all implementations return true forsupportsLookupNameUtf8()
.
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.DimensionDictionarySelector
CARDINALITY_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description StringSingleValueDimensionVectorSelector(ColumnarInts column, ReadableVectorOffset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentVectorSize()
Returns the current vector size for this cursor.int
getMaxVectorSize()
Returns the maximum vector size for this cursor.int[]
getRowVector()
Get the current vector.IdLookup
idLookup()
ReturnsIdLookup
if available for this DimensionSelector, or null.boolean
nameLookupPossibleInAdvance()
Returns true if it is possible toDimensionDictionarySelector.lookupName(int)
by ids from 0 toDimensionDictionarySelector.getValueCardinality()
before the rows with those ids are returned.boolean
supportsLookupNameUtf8()
Returns whether this selector supportsDimensionDictionarySelector.lookupNameUtf8(int)
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.segment.DimensionDictionarySelector
getValueCardinality, lookupName, lookupNameUtf8
-
-
-
-
Constructor Detail
-
StringSingleValueDimensionVectorSelector
public StringSingleValueDimensionVectorSelector(ColumnarInts column, ReadableVectorOffset offset)
-
-
Method Detail
-
getRowVector
public int[] getRowVector()
Description copied from interface:SingleValueDimensionVectorSelector
Get the current vector. The array will be reused, so it is not a good idea to retain a reference to it.- Specified by:
getRowVector
in interfaceSingleValueDimensionVectorSelector
-
supportsLookupNameUtf8
public boolean supportsLookupNameUtf8()
Description copied from interface:DimensionDictionarySelector
Returns whether this selector supportsDimensionDictionarySelector.lookupNameUtf8(int)
.- Specified by:
supportsLookupNameUtf8
in interfaceDimensionDictionarySelector
-
nameLookupPossibleInAdvance
public boolean nameLookupPossibleInAdvance()
Description copied from interface:DimensionDictionarySelector
Returns true if it is possible toDimensionDictionarySelector.lookupName(int)
by ids from 0 toDimensionDictionarySelector.getValueCardinality()
before the rows with those ids are returned.Returns false if
DimensionDictionarySelector.lookupName(int)
could be called with ids, returned from the most recent row (or row vector) returned by this DimensionSelector, but not earlier. IfDimensionDictionarySelector.getValueCardinality()
of this selector additionally returnsDimensionDictionarySelector.CARDINALITY_UNKNOWN
,lookupName()
couldn't be called with ids, returned by not the most recent row (or row vector), i. e. names for ids couldn't be looked up "later". IfDimensionDictionarySelector.getValueCardinality()
returns a non-negative number,lookupName()
could be called with any ids, returned from rows (or row vectors) returned since the creation of this DimensionSelector.If
DimensionDictionarySelector.lookupName(int)
is called with an ineligible id, result is undefined: exception could be thrown, or null returned, or some other random value.- Specified by:
nameLookupPossibleInAdvance
in interfaceDimensionDictionarySelector
-
idLookup
@Nullable public IdLookup idLookup()
Description copied from interface:DimensionDictionarySelector
ReturnsIdLookup
if available for this DimensionSelector, or null.- Specified by:
idLookup
in interfaceDimensionDictionarySelector
-
getCurrentVectorSize
public int getCurrentVectorSize()
Description copied from interface:VectorSizeInspector
Returns the current vector size for this cursor. Will never be larger than the max size returned byVectorSizeInspector.getMaxVectorSize()
.- Specified by:
getCurrentVectorSize
in interfaceVectorSizeInspector
-
getMaxVectorSize
public int getMaxVectorSize()
Description copied from interface:VectorSizeInspector
Returns 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:
getMaxVectorSize
in interfaceVectorSizeInspector
-
-