Package org.apache.druid.segment.column
Class StringUtf8DictionaryEncodedColumn
- java.lang.Object
-
- org.apache.druid.segment.column.StringUtf8DictionaryEncodedColumn
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,BaseColumn
,DictionaryEncodedColumn<String>
,NestedCommonFormatColumn
public class StringUtf8DictionaryEncodedColumn extends Object implements DictionaryEncodedColumn<String>, NestedCommonFormatColumn
DictionaryEncodedColumn
for a column which has aByteBuffer
based UTF-8 dictionary.Implements
NestedCommonFormatColumn
so it can be used as a reader for single value string specializations ofAutoTypeColumnIndexer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StringUtf8DictionaryEncodedColumn.MultiValueStringVectorObjectSelector
Base type for aVectorObjectSelector
for a dictionary encodedColumnType.STRING
built around aColumnarMultiInts
.static class
StringUtf8DictionaryEncodedColumn.StringMultiValueDimensionVectorSelector
Base type for aMultiValueDimensionVectorSelector
for a dictionary encodedColumnType.STRING
built around aColumnarMultiInts
.static class
StringUtf8DictionaryEncodedColumn.StringSingleValueDimensionVectorSelector
Base type for aSingleValueDimensionVectorSelector
for a dictionary encodedColumnType.STRING
built around aColumnarInts
.static class
StringUtf8DictionaryEncodedColumn.StringVectorObjectSelector
Base type for aVectorObjectSelector
for a dictionary encodedColumnType.STRING
built around aColumnarInts
.-
Nested classes/interfaces inherited from interface org.apache.druid.segment.nested.NestedCommonFormatColumn
NestedCommonFormatColumn.Format
-
-
Constructor Summary
Constructors Constructor Description StringUtf8DictionaryEncodedColumn(ColumnarInts singleValueColumn, ColumnarMultiInts multiValueColumn, Indexed<ByteBuffer> utf8Dictionary, BitmapFactory bitmapFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
as(Class<? extends T> clazz)
void
close()
BitmapFactory
getBitmapFactory()
int
getCardinality()
ColumnType
getLogicalType()
IndexedInts
getMultiValueRow(int rowNum)
int
getSingleValueRow(int rowNum)
Indexed<String>
getStringDictionary()
boolean
hasMultipleValues()
int
length()
int
lookupId(String name)
String
lookupName(int id)
HistoricalDimensionSelector
makeDimensionSelector(ReadableOffset offset, ExtractionFn extractionFn)
MultiValueDimensionVectorSelector
makeMultiValueDimensionVectorSelector(ReadableVectorOffset offset)
SingleValueDimensionVectorSelector
makeSingleValueDimensionVectorSelector(ReadableVectorOffset offset)
VectorObjectSelector
makeVectorObjectSelector(ReadableVectorOffset offset)
-
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.column.BaseColumn
makeVectorValueSelector
-
Methods inherited from interface org.apache.druid.segment.column.DictionaryEncodedColumn
makeColumnValueSelector
-
Methods inherited from interface org.apache.druid.segment.nested.NestedCommonFormatColumn
getArrayDictionary, getDoubleDictionary, getFieldTypeInfo, getLongDictionary
-
-
-
-
Constructor Detail
-
StringUtf8DictionaryEncodedColumn
public StringUtf8DictionaryEncodedColumn(@Nullable ColumnarInts singleValueColumn, @Nullable ColumnarMultiInts multiValueColumn, Indexed<ByteBuffer> utf8Dictionary, BitmapFactory bitmapFactory)
-
-
Method Detail
-
length
public int length()
- Specified by:
length
in interfaceDictionaryEncodedColumn<String>
-
hasMultipleValues
public boolean hasMultipleValues()
- Specified by:
hasMultipleValues
in interfaceDictionaryEncodedColumn<String>
-
getSingleValueRow
public int getSingleValueRow(int rowNum)
- Specified by:
getSingleValueRow
in interfaceDictionaryEncodedColumn<String>
-
getMultiValueRow
public IndexedInts getMultiValueRow(int rowNum)
- Specified by:
getMultiValueRow
in interfaceDictionaryEncodedColumn<String>
-
lookupName
@Nullable public String lookupName(int id)
- Specified by:
lookupName
in interfaceDictionaryEncodedColumn<String>
-
lookupId
public int lookupId(String name)
- Specified by:
lookupId
in interfaceDictionaryEncodedColumn<String>
-
getCardinality
public int getCardinality()
- Specified by:
getCardinality
in interfaceDictionaryEncodedColumn<String>
-
getBitmapFactory
public BitmapFactory getBitmapFactory()
-
makeDimensionSelector
public HistoricalDimensionSelector makeDimensionSelector(ReadableOffset offset, @Nullable ExtractionFn extractionFn)
- Specified by:
makeDimensionSelector
in interfaceDictionaryEncodedColumn<String>
-
makeSingleValueDimensionVectorSelector
public SingleValueDimensionVectorSelector makeSingleValueDimensionVectorSelector(ReadableVectorOffset offset)
- Specified by:
makeSingleValueDimensionVectorSelector
in interfaceDictionaryEncodedColumn<String>
-
makeMultiValueDimensionVectorSelector
public MultiValueDimensionVectorSelector makeMultiValueDimensionVectorSelector(ReadableVectorOffset offset)
- Specified by:
makeMultiValueDimensionVectorSelector
in interfaceDictionaryEncodedColumn<String>
-
makeVectorObjectSelector
public VectorObjectSelector makeVectorObjectSelector(ReadableVectorOffset offset)
- Specified by:
makeVectorObjectSelector
in interfaceBaseColumn
-
as
@Nullable public <T> T as(Class<? extends T> clazz)
- Specified by:
as
in interfaceBaseColumn
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getLogicalType
public ColumnType getLogicalType()
- Specified by:
getLogicalType
in interfaceNestedCommonFormatColumn
-
getStringDictionary
public Indexed<String> getStringDictionary()
- Specified by:
getStringDictionary
in interfaceNestedCommonFormatColumn
-
-