Class OnHeapIntDictionary

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Dictionary

    public class OnHeapIntDictionary
    extends BaseImmutableDictionary
    Implementation of int dictionary that cache all values on-heap.

    This is useful for int columns that:

    • Have low cardinality int dictionary where memory footprint on-heap is acceptably small
    • Is heavily queried

    This helps avoid creation of int from byte[].

    • Constructor Detail

      • OnHeapIntDictionary

        public OnHeapIntDictionary​(PinotDataBuffer dataBuffer,
                                   int length)
        Constructor for the class. Populates the value <-> mappings.
        Parameters:
        dataBuffer - Pinot data buffer
        length - Length of the dictionary
    • Method Detail

      • indexOf

        public int indexOf​(int intValue)
      • insertionIndexOf

        public int insertionIndexOf​(String stringValue)
      • get

        public Integer 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)