Repository navigation
feat: add table-aware position delete updates - #919
wirybeaver wants to merge 1 commit into
Conversation
e6db958 to
c11cea2
Compare
c11cea2 to
477a2ff
Compare
477a2ff to
658315c
Compare
658315c to
f256e78
Compare
|
@wirybeaver is this ready for review? |
f43d28c to
2bd9494
Compare
|
Hi, @zhjwpku feel free to take a review. I rebase the most recent and updated the PR body |
CI failed, please take a look when available, thanks. |
2bd9494 to
1c49395
Compare
|
Hi @zhjwpku , I updated FileIO to treat only ENOENT from the delete operation as success. Deleting a bucket-only S3 URI now propagates the original error. The previously failing AWS test passes locally. |
|
What use case do we have in mind for
That lets the engine reuse its original scan tasks, read prior deletes with the scan’s Given that, I’d prefer to hold this PR until there is a clear use case. |
|
@wgtmac The intended caller is an engine that has already identified the rows to delete. A shared API would let each engine report those positions while Iceberg handles the version-specific work. In v2, that means writing sorted position deletes. In v3, it means merging new positions with prior deletes and atomically replacing the superseded delete entries. I agree that (path, pos) loses the original scan context. I’ve revised this locally as an internal helper. It takes positions grouped by the original FileScanTask, reads prior deletes with the scan’s FileIO, and returns the delete entries to add and remove. The caller commits them through RowDelta using the original snapshot ID, so there’s no second planning pass. The follow-up PR #1182 uses this helper for a filter-based merge-on-read delete. Iceberg Go uses a similar split in its delete operation. |
7219f4b to
e1b9600
Compare
e1b9600 to
571f75b
Compare
Motivation
DV-PR-1 in #916 lets callers delete a row by data file and position. A second delete on the same v3 file must preserve positions deleted by the first commit.
Modification
Resolve each live file's partition and spec, and check the requested positions against its record count before creating output. Commit through
RowDelta, which validates that the referenced data files still exist.A definite commit failure cleans up generated files. An unknown commit outcome preserves them because the catalog may already reference them.
Test
The in-library end-to-end test uses real Parquet and Puffin encoding with Arrow MockFileSystem and InMemoryCatalog.