Skip to main content

Module compaction_resolver

Module compaction_resolver 

Source

StructsΒ§

AbortOnDrop πŸ”’
Aborts the spawned tasks when dropped, e.g. when the resolver stream fails or is dropped early.
CompactionPk πŸ”’
An owned compaction key hashed like RowRef for allocation-free borrowed lookups.
CompactionResolverExecutor
Leaf executor for the iceberg pk-index coordinated compaction.
OutputScanSplit πŸ”’
One row group of an output data file, scanned by its own task.
OutputTypeProjection πŸ”’
Like the cast projection after an Iceberg engine-table scan, restores the writer’s declared PK types using SQL casts. Metadata columns must match exactly. Build expressions once and reuse unchanged columns. Delete-diff comparisons remain in physical types on both sides.

ConstantsΒ§

DELETE_DIFF_CONCURRENCY πŸ”’
Concurrent input files whose delete diff is read and re-scanned.
MANIFEST_LOAD_CONCURRENCY πŸ”’
Concurrent manifest loads when collecting the delete files of a snapshot.
OUTPUT_FILE_OPEN_CONCURRENCY πŸ”’
Concurrent output data files whose parquet footers are loaded to plan the scan.
OUTPUT_SCAN_CHANNEL_CAPACITY πŸ”’
OUTPUT_SCAN_CONCURRENCY πŸ”’
Concurrent row-group scans of the output data files while rebuilding the pk index.

FunctionsΒ§

changed_input_delete_files πŸ”’
Returns (input path, delete file at R, delete file at N) for every input data file whose live position-delete file at N differs from the one at R.
collect_delete_diff_pks πŸ”’
Recovers the primary keys deleted between snapshots R and N from the input data files.
collect_input_delete_files πŸ”’
Walks the delete manifests of snapshot and returns, per input data file, the live position-delete file referencing it.
is_same_delete_file πŸ”’
Delete files are immutable, so the same location identifies the same deleted positions. A deletion vector is a blob inside a Puffin file, so its offset and length are part of its location.
pk_projection πŸ”’
Builds a projection for PK root columns and maps the projected physical order back to the downstream PK order.
plan_output_file_splits πŸ”’
Loads the parquet footer of an output data file and splits the file into its row groups.
resolver_task_from_initial_barrier πŸ”’
scan_input_pks_at_positions πŸ”’
scan_output_split πŸ”’
Scans one row group of an output data file, sends its survivor rows to chunk_tx, and returns the positions of its conflict rows. A scan error is sent to chunk_tx too, so the resolver fails without waiting for the other scans.
scan_output_split_inner πŸ”’
survivor_chunk πŸ”’
Builds the survivor chunk [pk_columns.., data_file, position] of a batch of output rows whose first row is at first_position in path. Rows whose pk was deleted during the compaction window are recorded in conflicts instead. Returns None if no row survives. data_file is the UUID in UUID mode, or the path in legacy mode.
validate_resolver_end_barrier πŸ”’
write_conflict_delete_files πŸ”’

Type AliasesΒ§

OutputChunkSender πŸ”’