38class PositionDeleteIndex;
55 static constexpr int64_t kMaxPosition = 0x7FFFFFFE80000000LL;
69 void Add(int64_t pos);
77 void AddRange(int64_t pos_start, int64_t pos_end);
101 void ForEach(
const std::function<
void(int64_t)>& fn)
const;
114 std::unique_ptr<Impl> impl_;
121 void AddManyForKey(int32_t key, std::span<const uint32_t> positions);
Tracks deleted row positions using a bitmap.
Definition position_delete_index.h:42
A bitmap that supports positive 64-bit positions, optimized for cases where most positions fit in 32 ...
Definition roaring_position_bitmap.h:52
void ForEach(const std::function< void(int64_t)> &fn) const
Iterates over all set positions in ascending order.
void Add(int64_t pos)
Sets a position in the bitmap.
Result< std::string > Serialize() const
Serializes using the portable format (little-endian).
size_t Cardinality() const
Returns the number of set positions in the bitmap.
void Or(const RoaringPositionBitmap &other)
Merges all positions from the other bitmap into this one (in-place union).
void AddRange(int64_t pos_start, int64_t pos_end)
Sets a range of positions [pos_start, pos_end).
bool Contains(int64_t pos) const
Checks if a position is set in the bitmap.
static Result< RoaringPositionBitmap > Deserialize(std::string_view bytes)
Deserializes a bitmap from bytes.
bool IsEmpty() const
Returns true if the bitmap has no positions set.
bool Optimize()
Optimizes the bitmap by applying run-length encoding to containers where it is more space efficient t...
size_t SerializedSizeInBytes() const
Returns the serialized size in bytes.
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.