Class ImmutableBitSliceIndex

    • Constructor Detail

      • ImmutableBitSliceIndex

        public ImmutableBitSliceIndex​(int maxValue,
                                      int minValue,
                                      org.roaringbitmap.buffer.ImmutableRoaringBitmap[] bA,
                                      org.roaringbitmap.buffer.ImmutableRoaringBitmap ebM)
        constructs a BSI use slice and ebM notes: the max size of BSI might be: 33 * 120MB( 1 Billion cardinality) = 3960MB which might lead to OOM. so don't use this function if you have no idea of the mechanism you'd better split your data and make every shard suitable for memory.
        Parameters:
        bA -
        ebM -
        maxValue -
        minValue -
      • ImmutableBitSliceIndex

        public ImmutableBitSliceIndex()
      • ImmutableBitSliceIndex

        public ImmutableBitSliceIndex​(java.nio.ByteBuffer buffer)
                               throws java.io.IOException
        constructs a BSI from byteBuffer notes: the max size of BSI might be: 33 * 120MB( 1 Billion cardinality) = 3960MB which might lead to OOM. so don't use this function if you have no idea of the mechanism you'd better split your data and make every shard suitable for memory.
        Parameters:
        buffer -
        Throws:
        java.io.IOException
    • Method Detail

      • addDigit

        public void addDigit​(org.roaringbitmap.buffer.ImmutableRoaringBitmap foundSet,
                             int i)
      • getExistenceBitmap

        public org.roaringbitmap.buffer.ImmutableRoaringBitmap getExistenceBitmap()
      • setValue

        public void setValue​(int cid,
                             int value)
        Description copied from interface: BitmapSliceIndex
        set value for bsi, setValue will set each bit slice according to the input value given that we have bsi as follow ebm: RB[1 1 1 1] slice0: RB[0 1 0 1] - slice1: RB[1 0 1 0] | slice2: RB[1 0 0 1] |--bA:bit slice Array slice3: RB[0 0 0 1] - 1 2 3 4 | ---------------- columnId or rowId for columnId 1, the value is 110 that is :6 for columnId 2, the value is 1 that is :1 for columnId 3, the value is 10 that is :2 for columnId 4, the value is 1101 that is :11
        Specified by:
        setValue in interface BitmapSliceIndex
        Parameters:
        cid - columnId or rowId
        value - value for this columnId or rowId
      • setValues

        public void setValues​(java.util.List<Pair<java.lang.Integer,​java.lang.Integer>> values,
                              java.lang.Integer currentMaxValue,
                              java.lang.Integer currentMinValue)
        Description copied from interface: BitmapSliceIndex
        setValues will batch set value for this bsi. currentMaxValue/currentMinValue are optional,it's can be compute from input value list. and avoiding bsi expend slice array capacity.
        Specified by:
        setValues in interface BitmapSliceIndex
      • serialize

        public void serialize​(java.io.DataOutput output)
                       throws java.io.IOException
        Specified by:
        serialize in interface BitmapSliceIndex
        Throws:
        java.io.IOException