public class BitmapDeletionVector extends Object implements DeletionVector
DeletionVector based on RoaringBitmap32, it only supports files with row count
not exceeding RoaringBitmap32.MAX_VALUE.DeletionVector.Factory| Modifier and Type | Field and Description |
|---|---|
static int |
MAGIC_NUMBER |
static int |
MAGIC_NUMBER_SIZE_BYTES |
| Constructor and Description |
|---|
BitmapDeletionVector() |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateChecksum(byte[] bytes) |
boolean |
checkedDelete(long position)
Marks the row at the specified position as deleted.
|
void |
delete(long position)
Marks the row at the specified position as deleted.
|
static DeletionVector |
deserializeFromByteBuffer(ByteBuffer buffer) |
boolean |
equals(Object o) |
RoaringBitmap32 |
get()
Note: the result is read only, do not call any modify operation outside.
|
long |
getCardinality() |
int |
hashCode() |
boolean |
isDeleted(long position)
Checks if the row at the specified position is marked as deleted.
|
boolean |
isEmpty()
Determines if the deletion vector is empty, indicating no deletions.
|
void |
merge(DeletionVector deletionVector)
merge another
DeletionVector to this current one. |
int |
serializeTo(DataOutputStream out)
Serializes the deletion vector.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdeserializeFromBytes, emptyFactory, factory, factory, read, read, serializeToBytespublic static final int MAGIC_NUMBER
public static final int MAGIC_NUMBER_SIZE_BYTES
public void delete(long position)
DeletionVectordelete in interface DeletionVectorposition - The position of the row to be marked as deleted.public void merge(DeletionVector deletionVector)
DeletionVectorDeletionVector to this current one.merge in interface DeletionVectordeletionVector - the other DeletionVectorpublic boolean checkedDelete(long position)
DeletionVectorcheckedDelete in interface DeletionVectorposition - The position of the row to be marked as deleted.public boolean isDeleted(long position)
DeletionVectorisDeleted in interface DeletionVectorposition - The position of the row to check.public boolean isEmpty()
DeletionVectorisEmpty in interface DeletionVectorpublic long getCardinality()
getCardinality in interface DeletionVectorpublic int serializeTo(DataOutputStream out)
DeletionVectorserializeTo in interface DeletionVectorpublic RoaringBitmap32 get()
public static DeletionVector deserializeFromByteBuffer(ByteBuffer buffer) throws IOException
IOExceptionpublic static int calculateChecksum(byte[] bytes)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.