Class OnHeapFloatDictionary

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

    public class OnHeapFloatDictionary
    extends BaseImmutableDictionary
    Implementation of float dictionary that cache all values on-heap.

    This is useful for float columns that:

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

    This helps avoid creation of float from byte[].

    • Constructor Detail

      • OnHeapFloatDictionary

        public OnHeapFloatDictionary​(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​(float floatValue)
      • insertionIndexOf

        public int insertionIndexOf​(String stringValue)
      • get

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