Class StringUtf8DictionaryEncodedColumn.StringMultiValueDimensionVectorSelector
- java.lang.Object
-
- org.apache.druid.segment.column.StringUtf8DictionaryEncodedColumn.StringMultiValueDimensionVectorSelector
-
- All Implemented Interfaces:
DimensionDictionarySelector,IdLookup,MultiValueDimensionVectorSelector,VectorSizeInspector
- Enclosing class:
- StringUtf8DictionaryEncodedColumn
public abstract static class StringUtf8DictionaryEncodedColumn.StringMultiValueDimensionVectorSelector extends Object implements MultiValueDimensionVectorSelector, IdLookup
Base type for aMultiValueDimensionVectorSelectorfor a dictionary encodedColumnType.STRINGbuilt around aColumnarMultiInts. Dictionary not included - BYO dictionary lookup methods.Assumes that all implementations return true for
supportsLookupNameUtf8().
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.DimensionDictionarySelector
CARDINALITY_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description StringMultiValueDimensionVectorSelector(ColumnarMultiInts multiValueColumn, ReadableVectorOffset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentVectorSize()Returns the current vector size for this cursor.intgetMaxVectorSize()Returns the maximum vector size for this cursor.IndexedInts[]getRowVector()Get the current vector.IdLookupidLookup()ReturnsIdLookupif available for this DimensionSelector, or null.booleannameLookupPossibleInAdvance()Returns true if it is possible toDimensionDictionarySelector.lookupName(int)by ids from 0 toDimensionDictionarySelector.getValueCardinality()before the rows with those ids are returned.booleansupportsLookupNameUtf8()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
-
StringMultiValueDimensionVectorSelector
public StringMultiValueDimensionVectorSelector(ColumnarMultiInts multiValueColumn, ReadableVectorOffset offset)
-
-
Method Detail
-
getRowVector
public IndexedInts[] getRowVector()
Description copied from interface:MultiValueDimensionVectorSelectorGet the current vector. The array will be reused, so it is not a good idea to retain a reference to it.- Specified by:
getRowVectorin interfaceMultiValueDimensionVectorSelector
-
supportsLookupNameUtf8
public boolean supportsLookupNameUtf8()
Description copied from interface:DimensionDictionarySelectorReturns whether this selector supportsDimensionDictionarySelector.lookupNameUtf8(int).- Specified by:
supportsLookupNameUtf8in interfaceDimensionDictionarySelector
-
nameLookupPossibleInAdvance
public boolean nameLookupPossibleInAdvance()
Description copied from interface:DimensionDictionarySelectorReturns 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:
nameLookupPossibleInAdvancein interfaceDimensionDictionarySelector
-
idLookup
@Nullable public IdLookup idLookup()
Description copied from interface:DimensionDictionarySelectorReturnsIdLookupif available for this DimensionSelector, or null.- Specified by:
idLookupin interfaceDimensionDictionarySelector
-
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
-
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
-
-