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).| Modifier and Type | Class and Description |
|---|---|
static class |
VariantColumn.VariantVectorObjectSelector
Make a
VectorObjectSelector for a dictionary encoded column that coerces mixed types to a common type |
NestedCommonFormatColumn.Format| Constructor and Description |
|---|
VariantColumn(TStringDictionary stringDictionary,
FixedIndexed<Long> longDictionary,
FixedIndexed<Double> doubleDictionary,
FrontCodedIntArrayIndexed arrayDictionary,
ColumnarInts encodedValueColumn,
ImmutableBitmap nullValueBitmap,
ColumnType logicalType,
Byte variantTypeSetByte) |
public VariantColumn(TStringDictionary stringDictionary, FixedIndexed<Long> longDictionary, FixedIndexed<Double> doubleDictionary, FrontCodedIntArrayIndexed arrayDictionary, ColumnarInts encodedValueColumn, ImmutableBitmap nullValueBitmap, ColumnType logicalType, @Nullable Byte variantTypeSetByte)
public ColumnType getLogicalType()
getLogicalType in interface NestedCommonFormatColumnpublic Indexed<String> getStringDictionary()
getStringDictionary in interface NestedCommonFormatColumnpublic Indexed<Long> getLongDictionary()
getLongDictionary in interface NestedCommonFormatColumnpublic Indexed<Double> getDoubleDictionary()
getDoubleDictionary in interface NestedCommonFormatColumnpublic Indexed<Object[]> getArrayDictionary()
getArrayDictionary in interface NestedCommonFormatColumnpublic SortedMap<String,FieldTypeInfo.MutableTypeSet> getFieldTypeInfo()
getFieldTypeInfo in interface NestedCommonFormatColumnpublic int length()
length in interface DictionaryEncodedColumn<String>public boolean hasMultipleValues()
hasMultipleValues in interface DictionaryEncodedColumn<String>public int getSingleValueRow(int rowNum)
getSingleValueRow in interface DictionaryEncodedColumn<String>public IndexedInts getMultiValueRow(int rowNum)
getMultiValueRow in interface DictionaryEncodedColumn<String>@Nullable public String lookupName(int id)
lookupName in interface DictionaryEncodedColumn<String>public int lookupId(String val)
lookupId in interface DictionaryEncodedColumn<String>public it.unimi.dsi.fastutil.ints.IntSet lookupIds(String val)
public int getCardinality()
getCardinality in interface DictionaryEncodedColumn<String>public DimensionSelector makeDimensionSelector(ReadableOffset offset, @Nullable ExtractionFn extractionFn)
makeDimensionSelector in interface DictionaryEncodedColumn<String>public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
makeColumnValueSelector in interface BaseColumnmakeColumnValueSelector in interface DictionaryEncodedColumn<String>public SingleValueDimensionVectorSelector makeSingleValueDimensionVectorSelector(ReadableVectorOffset offset)
makeSingleValueDimensionVectorSelector in interface DictionaryEncodedColumn<String>public MultiValueDimensionVectorSelector makeMultiValueDimensionVectorSelector(ReadableVectorOffset vectorOffset)
makeMultiValueDimensionVectorSelector in interface DictionaryEncodedColumn<String>public VectorValueSelector makeVectorValueSelector(ReadableVectorOffset offset)
makeVectorValueSelector in interface BaseColumnpublic VectorObjectSelector makeVectorObjectSelector(ReadableVectorOffset offset)
makeVectorObjectSelector in interface BaseColumnpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.