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 |
Constructor and Description |
---|
BitmapDeletionVector() |
Modifier and Type | Method and Description |
---|---|
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 |
deserializeFromDataInput(DataInput bis) |
boolean |
equals(Object o) |
long |
getCardinality() |
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. |
byte[] |
serializeToBytes()
Serializes the deletion vector to a byte array for storage or transmission.
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserializeFromBytes, emptyFactory, factory, factory, read
public static final int MAGIC_NUMBER
public void delete(long position)
DeletionVector
delete
in interface DeletionVector
position
- The position of the row to be marked as deleted.public void merge(DeletionVector deletionVector)
DeletionVector
DeletionVector
to this current one.merge
in interface DeletionVector
deletionVector
- the other DeletionVector
public boolean checkedDelete(long position)
DeletionVector
checkedDelete
in interface DeletionVector
position
- The position of the row to be marked as deleted.public boolean isDeleted(long position)
DeletionVector
isDeleted
in interface DeletionVector
position
- The position of the row to check.public boolean isEmpty()
DeletionVector
isEmpty
in interface DeletionVector
public long getCardinality()
getCardinality
in interface DeletionVector
public byte[] serializeToBytes()
DeletionVector
serializeToBytes
in interface DeletionVector
public static DeletionVector deserializeFromDataInput(DataInput bis) throws IOException
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.