Class OnHeapBytesDictionary

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Dictionary

    public class OnHeapBytesDictionary
    extends BaseImmutableDictionary
    Implementation of BYTES dictionary that cache all values on-heap.

    This is useful for BYTES columns that:

    • Has low cardinality BYTES dictionary where memory footprint on-heap is acceptably small
    • Is heavily queried
    • Constructor Detail

      • OnHeapBytesDictionary

        public OnHeapBytesDictionary​(PinotDataBuffer dataBuffer,
                                     int length,
                                     int numBytesPerValue)
    • Method Detail

      • indexOf

        public int indexOf​(ByteArray bytesValue)
      • insertionIndexOf

        public int insertionIndexOf​(String stringValue)
      • get

        public byte[] get​(int dictId)
      • getInternal

        public Object getInternal​(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)