Class RoaringBitmapArray

Object
io.delta.kernel.internal.deletionvectors.RoaringBitmapArray

public final class RoaringBitmapArray extends Object
A 64-bit extension of [[RoaringBitmap]] that is optimized for cases that usually fit within a 32-bit bitmap, but may run over by a few bits on occasion.

This focus makes it different from [[org.roaringbitmap.longlong.Roaring64NavigableMap]] and [[org.roaringbitmap.longlong.Roaring64Bitmap]] which focus on sparse bitmaps over the whole 64-bit range.

Structurally, this implementation simply uses the most-significant 4 bytes to index into an array of 32-bit [[RoaringBitmap]] instances. The array is grown as necessary to accommodate the largest value in the bitmap.

*Note:* As opposed to the other two 64-bit bitmap implementations mentioned above, this implementation cannot accommodate `Long` values where the most significant bit is non-zero (i.e., negative `Long` values). It cannot even accommodate values where the 4 high-order bytes are `Int.MaxValue`, because then the length of the `bitmaps` array would be a negative number (`Int.MaxValue + 1`).

Taken from https://github.com/delta-io/delta/blob/master/spark/src/main/scala/org/apache/spark /sql/delta/deletionvectors/RoaringBitmapArray.scala

  • Constructor Details

    • RoaringBitmapArray

      public RoaringBitmapArray()
  • Method Details

    • contains

      public boolean contains(long value)
      Checks whether the value is included, which is equivalent to checking if the corresponding bit is set.
    • add

      public void add(long value)
    • create

      public static RoaringBitmapArray create(long... values)