Package org.apache.druid.segment.nested
Class VariantColumn<TStringDictionary extends Indexed<ByteBuffer>>
java.lang.Object
org.apache.druid.segment.nested.VariantColumn<TStringDictionary>
- All Implemented Interfaces:
Closeable,AutoCloseable,BaseColumn,DictionaryEncodedColumn<String>,SelectableColumn,NestedCommonFormatColumn
public class VariantColumn<TStringDictionary extends Indexed<ByteBuffer>>
extends Object
implements DictionaryEncodedColumn<String>, NestedCommonFormatColumn
NestedCommonFormatColumn for single type array columns, and mixed type columns. If variantTypes
is non-null, the column is composed of all of the types defined there, otherwise all rows are consistently
logicalType. If mixed type, logical type is set by ColumnType.leastRestrictiveType(org.apache.druid.segment.column.ColumnType, org.apache.druid.segment.column.ColumnType).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMake aVectorObjectSelectorfor a dictionary encoded column that coerces mixed types to a common typeNested classes/interfaces inherited from interface org.apache.druid.segment.nested.NestedCommonFormatColumn
NestedCommonFormatColumn.Format -
Constructor Summary
ConstructorsConstructorDescriptionVariantColumn(TStringDictionary stringDictionary, FixedIndexed<Long> longDictionary, FixedIndexed<Double> doubleDictionary, FrontCodedIntArrayIndexed arrayDictionary, ColumnarInts encodedValueColumn, ImmutableBitmap nullValueBitmap, ColumnType logicalType, Byte variantTypeSetByte, BitmapFactory bitmapFactory) -
Method Summary
Modifier and TypeMethodDescription<T> TRequest an implementation of a particular interface.voidclose()intgetMultiValueRow(int rowNum) intgetSingleValueRow(int rowNum) booleanintlength()intit.unimi.dsi.fastutil.ints.IntSetlookupName(int id) makeDimensionSelector(ReadableOffset offset, ExtractionFn extractionFn) makeMultiValueDimensionVectorSelector(ReadableVectorOffset vectorOffset)
-
Constructor Details
-
VariantColumn
public VariantColumn(TStringDictionary stringDictionary, FixedIndexed<Long> longDictionary, FixedIndexed<Double> doubleDictionary, FrontCodedIntArrayIndexed arrayDictionary, ColumnarInts encodedValueColumn, ImmutableBitmap nullValueBitmap, ColumnType logicalType, @Nullable Byte variantTypeSetByte, BitmapFactory bitmapFactory)
-
-
Method Details
-
getLogicalType
- Specified by:
getLogicalTypein interfaceNestedCommonFormatColumn
-
getStringDictionary
- Specified by:
getStringDictionaryin interfaceNestedCommonFormatColumn
-
getLongDictionary
- Specified by:
getLongDictionaryin interfaceNestedCommonFormatColumn
-
getDoubleDictionary
- Specified by:
getDoubleDictionaryin interfaceNestedCommonFormatColumn
-
getArrayDictionary
- Specified by:
getArrayDictionaryin interfaceNestedCommonFormatColumn
-
getFieldTypeInfo
- Specified by:
getFieldTypeInfoin interfaceNestedCommonFormatColumn
-
length
public int length()- Specified by:
lengthin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
hasMultipleValues
public boolean hasMultipleValues()- Specified by:
hasMultipleValuesin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
getSingleValueRow
public int getSingleValueRow(int rowNum) - Specified by:
getSingleValueRowin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
getMultiValueRow
- Specified by:
getMultiValueRowin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupName
- Specified by:
lookupNamein interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupId
- Specified by:
lookupIdin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupIds
-
getCardinality
public int getCardinality()- Specified by:
getCardinalityin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
makeDimensionSelector
public DimensionSelector makeDimensionSelector(ReadableOffset offset, @Nullable ExtractionFn extractionFn) - Specified by:
makeDimensionSelectorin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
makeColumnValueSelector
- Specified by:
makeColumnValueSelectorin interfaceBaseColumn- Specified by:
makeColumnValueSelectorin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
makeSingleValueDimensionVectorSelector
public SingleValueDimensionVectorSelector makeSingleValueDimensionVectorSelector(ReadableVectorOffset offset) - Specified by:
makeSingleValueDimensionVectorSelectorin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
makeMultiValueDimensionVectorSelector
public MultiValueDimensionVectorSelector makeMultiValueDimensionVectorSelector(ReadableVectorOffset vectorOffset) - Specified by:
makeMultiValueDimensionVectorSelectorin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
makeVectorValueSelector
- Specified by:
makeVectorValueSelectorin interfaceBaseColumn
-
makeVectorObjectSelector
- Specified by:
makeVectorObjectSelectorin interfaceBaseColumn
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
as
Description copied from interface:SelectableColumnRequest an implementation of a particular interface. Physical nested columns, and virtual columns that act as a nested column, should implement:-
NestedColumnTypeInspector, required. -
NestedColumnSelectorFactory, required. -
NestedVectorColumnSelectorFactory, required. -
NestedColumnIndexSupplier, if the column has indexes.
- Specified by:
asin interfaceSelectableColumn- Type Parameters:
T- desired interface- Parameters:
clazz- desired interface- Returns:
- instance of clazz, or null if the interface is not supported by this segment
-
-