Class OnHeapDoubleDictionary

  • All Implemented Interfaces:
    Closeable, AutoCloseable, IndexReader, Dictionary

    public class OnHeapDoubleDictionary
    extends BaseImmutableDictionary
    Implementation of double dictionary that cache all values on-heap.

    This is useful for double columns that:

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

    This helps avoid creation of double from byte[].

    • Constructor Detail

      • OnHeapDoubleDictionary

        public OnHeapDoubleDictionary​(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​(double doubleValue)
      • insertionIndexOf

        public int insertionIndexOf​(String stringValue)
      • get

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