Class RoaringBitmapArray
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long value) booleancontains(long value) Checks whether the value is included, which is equivalent to checking if the corresponding bit is set.static RoaringBitmapArraycreate(long... values)
-
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
-