Class PinotDataBitSetV2

    • Field Detail

      • _numBitsPerValue

        protected int _numBitsPerValue
    • Constructor Detail

      • PinotDataBitSetV2

        public PinotDataBitSetV2()
    • Method Detail

      • readInt

        public abstract int readInt​(long index)
        Decode integers starting at a given index. This is efficient because of simplified bitmath.
        Parameters:
        index - docId
        Returns:
        unpacked integer
      • readInt

        public abstract void readInt​(long startIndex,
                                     int length,
                                     int[] out)
        Decode integers for a contiguous range of indexes represented by startIndex and length. This uses vectorization as much as possible for all the aligned reads and also takes care of the small byte-sized window of unaligned read.
        Parameters:
        startIndex - start docId
        length - length
        out - out array to store the unpacked integers
      • readInt

        public void readInt​(int[] docIds,
                            int docIdsStartIndex,
                            int length,
                            int[] out,
                            int outpos)
        Decode integers for an array of indexes which is not necessarily contiguous. So there could be gaps in the array: e.g: [1, 3, 7, 9, 11, 12] The actual read is done by the previous API since that is efficient as it exploits contiguity and uses vectorization. However, since the out[] array has to be correctly populated with the unpacked integer for each index, a post-processing step is needed after the bulk contiguous read to correctly set the unpacked integer into the out array throwing away the unnecessary values decoded as part of contiguous read
        Parameters:
        docIds - index array
        docIdsStartIndex - starting index in the docIds array
        length - length to read (number of docIds to read in the array)
        out - out array to store the decoded integers
        outpos - starting index in the out array
      • writeInt

        protected void writeInt​(int index,
                                int value)
      • writeInt

        public void writeInt​(int startIndex,
                             int length,
                             int[] values)