Class OnHeapBigDecimalDictionary
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.readers.BaseImmutableDictionary
-
- org.apache.pinot.segment.local.segment.index.readers.OnHeapBigDecimalDictionary
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Dictionary
public class OnHeapBigDecimalDictionary extends BaseImmutableDictionary
Implementation of BIG_DECIMAL dictionary that cache all values on-heap.This is useful for BIG_DECIMAL columns that:
- Has low cardinality BIG_DECIMAL dictionary where memory footprint on-heap is acceptably small
- Is heavily queried
-
-
Field Summary
-
Fields inherited from interface org.apache.pinot.segment.spi.index.reader.Dictionary
NULL_VALUE_INDEX
-
-
Constructor Summary
Constructors Constructor Description OnHeapBigDecimalDictionary(PinotDataBuffer dataBuffer, int length, int numBytesPerValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimalget(int dictId)BigDecimalgetBigDecimalValue(int dictId)byte[]getBytesValue(int dictId)doublegetDoubleValue(int dictId)floatgetFloatValue(int dictId)intgetIntValue(int dictId)longgetLongValue(int dictId)StringgetStringValue(int dictId)FieldSpec.DataTypegetValueType()intindexOf(BigDecimal bigDecimalValue)intinsertionIndexOf(String stringValue)-
Methods inherited from class org.apache.pinot.segment.local.segment.index.readers.BaseImmutableDictionary
binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, close, compare, getBigDecimal, getBuffer, getBytes, getDictIdsInRange, getDouble, getFloat, getInt, getLong, getMaxVal, getMinVal, getPaddedString, getSortedValues, getUnpaddedString, indexOf, isSorted, length, normalizeIndex, padString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.reader.Dictionary
getByteArrayValue, getInternal, indexOf, indexOf, indexOf, indexOf, indexOf, readBigDecimalValues, readBytesValues, readDoubleValues, readFloatValues, readIntValues, readLongValues, readStringValues
-
-
-
-
Constructor Detail
-
OnHeapBigDecimalDictionary
public OnHeapBigDecimalDictionary(PinotDataBuffer dataBuffer, int length, int numBytesPerValue)
-
-
Method Detail
-
getValueType
public FieldSpec.DataType getValueType()
-
indexOf
public int indexOf(BigDecimal bigDecimalValue)
-
insertionIndexOf
public int insertionIndexOf(String stringValue)
-
get
public BigDecimal get(int dictId)
-
getIntValue
public int getIntValue(int dictId)
-
getLongValue
public long getLongValue(int dictId)
-
getFloatValue
public float getFloatValue(int dictId)
-
getDoubleValue
public double getDoubleValue(int dictId)
-
getBigDecimalValue
public BigDecimal getBigDecimalValue(int dictId)
-
getStringValue
public String getStringValue(int dictId)
-
getBytesValue
public byte[] getBytesValue(int dictId)
-
-