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>,NestedCommonFormatColumn
public class VariantColumn<TStringDictionary extends Indexed<ByteBuffer>> extends Object implements DictionaryEncodedColumn<String>, NestedCommonFormatColumn
NestedCommonFormatColumnfor single type array columns, and mixed type columns. IfvariantTypesis non-null, the column is composed of all of the types defined there, otherwise all rows are consistentlylogicalType. If mixed type, logical type is set byColumnType.leastRestrictiveType(org.apache.druid.segment.column.ColumnType, org.apache.druid.segment.column.ColumnType).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVariantColumn.VariantVectorObjectSelectorMake aVectorObjectSelectorfor a dictionary encoded column that coerces mixed types to a common type-
Nested classes/interfaces inherited from interface org.apache.druid.segment.nested.NestedCommonFormatColumn
NestedCommonFormatColumn.Format
-
-
Constructor Summary
Constructors Constructor Description VariantColumn(TStringDictionary stringDictionary, FixedIndexed<Long> longDictionary, FixedIndexed<Double> doubleDictionary, FrontCodedIntArrayIndexed arrayDictionary, ColumnarInts encodedValueColumn, ImmutableBitmap nullValueBitmap, ColumnType logicalType, Byte variantTypeSetByte, BitmapFactory bitmapFactory)
-
Method Summary
-
-
-
Constructor Detail
-
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 Detail
-
getLogicalType
public ColumnType getLogicalType()
- Specified by:
getLogicalTypein interfaceNestedCommonFormatColumn
-
getStringDictionary
public Indexed<String> getStringDictionary()
- Specified by:
getStringDictionaryin interfaceNestedCommonFormatColumn
-
getLongDictionary
public Indexed<Long> getLongDictionary()
- Specified by:
getLongDictionaryin interfaceNestedCommonFormatColumn
-
getDoubleDictionary
public Indexed<Double> getDoubleDictionary()
- Specified by:
getDoubleDictionaryin interfaceNestedCommonFormatColumn
-
getArrayDictionary
public Indexed<Object[]> getArrayDictionary()
- Specified by:
getArrayDictionaryin interfaceNestedCommonFormatColumn
-
getFieldTypeInfo
public SortedMap<String,FieldTypeInfo.MutableTypeSet> 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
public IndexedInts getMultiValueRow(int rowNum)
- Specified by:
getMultiValueRowin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupName
@Nullable public String lookupName(int id)
- Specified by:
lookupNamein interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupId
public int lookupId(String val)
- Specified by:
lookupIdin interfaceDictionaryEncodedColumn<TStringDictionary extends Indexed<ByteBuffer>>
-
lookupIds
public it.unimi.dsi.fastutil.ints.IntSet lookupIds(String val)
-
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
public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
- 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
public VectorValueSelector makeVectorValueSelector(ReadableVectorOffset offset)
- Specified by:
makeVectorValueSelectorin interfaceBaseColumn
-
makeVectorObjectSelector
public VectorObjectSelector makeVectorObjectSelector(ReadableVectorOffset offset)
- Specified by:
makeVectorObjectSelectorin interfaceBaseColumn
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
as
@Nullable public <T> T as(Class<? extends T> clazz)
- Specified by:
asin interfaceBaseColumn
-
-