Tracks deleted row positions using a bitmap.
More...
#include <position_delete_index.h>
|
|
| PositionDeleteIndex (std::shared_ptr< DataFile > delete_file) |
| |
|
| PositionDeleteIndex (std::vector< std::shared_ptr< DataFile > > delete_files) |
| |
| void | Delete (int64_t pos) |
| | Mark a position as deleted.
|
| |
| void | Delete (int64_t pos_start, int64_t pos_end) |
| | Mark a range of positions as deleted [pos_start, pos_end).
|
| |
| bool | IsDeleted (int64_t pos) const |
| | Check if a position is deleted.
|
| |
|
bool | IsEmpty () const |
| | Check if the index is empty (no positions deleted).
|
| |
|
int64_t | Cardinality () const |
| | Get the number of deleted positions.
|
| |
| void | Merge (const PositionDeleteIndex &other) |
| | Merge another index into this one.
|
| |
| const std::vector< std::shared_ptr< DataFile > > & | delete_files () const |
| | The delete files whose positions were merged into this index.
|
| |
| Result< std::vector< uint8_t > > | Serialize () |
| | Serialize the index into a deletion-vector-v1 blob.
|
| |
|
| void ICEBERG_EXPORT | ForEachPositionDelete (std::span< const int64_t > positions, PositionDeleteIndex &target, std::vector< uint32_t > &scratch) |
| | Apply positions to target as deletes; semantically equivalent to calling target.Delete(pos) for each entry. Out-of-range positions are silently ignored. Sorted, mostly-contiguous input is fastest.
|
| |
Tracks deleted row positions using a bitmap.
This class provides a domain-specific API for position deletes in Iceberg MOR (merge-on-read) tables. Positions are 0-based row indices within a data file.
◆ Delete() [1/2]
| void iceberg::PositionDeleteIndex::Delete |
( |
int64_t |
pos | ) |
|
Mark a position as deleted.
- Parameters
-
| pos | The 0-based row position to delete |
◆ Delete() [2/2]
| void iceberg::PositionDeleteIndex::Delete |
( |
int64_t |
pos_start, |
|
|
int64_t |
pos_end |
|
) |
| |
Mark a range of positions as deleted [pos_start, pos_end).
- Parameters
-
| pos_start | Start position (inclusive) |
| pos_end | End position (exclusive) |
◆ delete_files()
| const std::vector< std::shared_ptr< DataFile > > & iceberg::PositionDeleteIndex::delete_files |
( |
| ) |
const |
|
inline |
The delete files whose positions were merged into this index.
Populated by constructors and Deserialize, and preserved across Merge. Callers use these to report the delete files that were rewritten when replacing them with a new deletion vector.
◆ Deserialize()
Deserialize a deletion-vector-v1 blob into an index.
Validates the blob framing (length prefix, magic sequence, CRC-32) and, against the source delete file, that the blob length matches content_size_in_bytes and the bitmap cardinality matches record_count. The source delete file is retained and exposed via delete_files().
◆ IsDeleted()
| bool iceberg::PositionDeleteIndex::IsDeleted |
( |
int64_t |
pos | ) |
const |
Check if a position is deleted.
- Parameters
-
| pos | The 0-based row position to check |
- Returns
- true if the position is deleted, false otherwise
◆ Merge()
Merge another index into this one.
- Parameters
-
| other | The index to merge (union operation) |
◆ Serialize()
| Result< std::vector< uint8_t > > iceberg::PositionDeleteIndex::Serialize |
( |
| ) |
|
◆ ForEachPositionDelete
| void ICEBERG_EXPORT ForEachPositionDelete |
( |
std::span< const int64_t > |
positions, |
|
|
PositionDeleteIndex & |
target, |
|
|
std::vector< uint32_t > & |
scratch |
|
) |
| |
|
friend |
Apply positions to target as deletes; semantically equivalent to calling target.Delete(pos) for each entry. Out-of-range positions are silently ignored. Sorted, mostly-contiguous input is fastest.
- Parameters
-
| scratch | Caller-owned reusable buffer for the bulk dispatch path. Cleared and reused per key group; retain across calls to amortize allocations. Pass a distinct scratch per thread when calling concurrently with disjoint target. |
The documentation for this class was generated from the following file: