Skip to main content

Module position_delete

Module position_delete 

Source
Expand description

Shared Iceberg position-delete (Parquet and Puffin deletion vector) helpers.

StructsΒ§

CachedPuffinReader πŸ”’
PositionDeleteFileNameGenerators
File-name generators shared by all Iceberg position-delete writers.
PositionDeleteReader
Shared decoder with at most one cached Puffin reader/footer. Callers may reuse it across sequential tasks for the same table/FileIO. Decoded bitmaps are never cached by path. Puffin paths must identify immutable files; drop the reader to release its cache.
PositionDeleteValidation πŸ”’
Checks required at the source boundary, but not by trusted sink read-modify-write calls.

ConstantsΒ§

DELETION_VECTOR_PROPERTY_CARDINALITY πŸ”’
Puffin blob property for deletion vector cardinality.
DELETION_VECTOR_PROPERTY_REFERENCED_DATA_FILE πŸ”’
Puffin blob property for referenced data file path.
POSITION_DELETE_WRITE_CHUNK_SIZE πŸ”’
How many positions to buffer before flushing one (file_path, pos) batch to the writer.

FunctionsΒ§

read_dv_positions_from_data_file
Reads the deletion-vector positions of a single Puffin DV DataFile.
read_parquet_position_deletes_from_file
Reads the positions stored in a V2 Parquet position-delete file into a [DeleteVector].
read_position_deletes_from_file
Reads the deleted positions of a single position-delete DataFile regardless of on-disk format,
validate_position_delete_descriptor πŸ”’
Metadata-only source checks, shared by planning (including compaction) and replay reads. Returns the validated blob range for Puffin, or None for Parquet.
write_dv_puffin_file
Writes delete_vector as a single Puffin deletion-vector blob referencing data_file_path, and returns its [DataFile] metadata (content PositionDeletes, format Puffin) with referenced_data_file set.
write_parquet_position_delete_file
Writes delete_vector as a single file-scoped Parquet position-delete file referencing data_file_path, and returns its [DataFile] metadata (content PositionDeletes, format Parquet) with referenced_data_file set.
write_position_delete_chunk πŸ”’
Writes one chunk of positions as a (file_path, pos) batch into writer. Every row shares data_file_path because the delete file is file-scoped.
write_position_delete_file
Write one file-scoped position-delete artifact using the table’s configured on-disk format.