Package org.apache.druid.segment
Class DimensionDictionary<T extends Comparable<T>>
java.lang.Object
org.apache.druid.segment.DimensionDictionary<T>
- Direct Known Subclasses:
StringDimensionDictionary
Buildable dictionary for some comparable type. Values are unsorted, or rather sorted in the order which they are
added. A
SortedDimensionDictionary can be constructed with a mapping of ids from this dictionary to the
sorted dictionary with the sort() method.
Concrete implementations of this dictionary must be thread-safe.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ABSENT_VALUE_ID
public static final int ABSENT_VALUE_ID- See Also:
-
-
Constructor Details
-
DimensionDictionary
-
-
Method Details
-
getId
-
getValue
-
getValues
-
size
public int size() -
sizeInBytes
public long sizeInBytes()Gets the current size of this dictionary in bytes.- Throws:
IllegalStateException- if size computation is disabled.
-
add
-
getMinValue
-
getMaxValue
-
getIdForNull
public int getIdForNull() -
sort
-
estimateSizeOfValue
Estimates the size of the dimension value in bytes.
-