Flink: Add equality delete conversion DV resolution and writing - #16858
Merged
Conversation
Adds EqualityConvertDVWriter, a two input operator keyed by data file path for the equality delete conversion task. It consumes the DVPositions emitted by EqualityConvertPKIndex and produces a DVWriteResult for the committer. Keying by data file path collects every position for a data file on one task, so the operator can write exactly one DV per file. Positions are buffered until the watermark reaches the cycle's plan timestamp, broadcast on the second input, at which point the operator resolves and writes the DVs. Existing DVs, including staging DVs for newly added data files, are folded into the rewrite because V3 allows only one DV per data file. Delete manifests are first pruned by partition summary to bound reads to the cycle's affected partitions rather than the table's full DV history. The operator fails fast if the main branch snapshot changed since planning. On an upstream abort signal or a write failure it emits DVWriteResult.ABORT to ensure the committer doesn't commit partial results.
Contributor
|
Thanks @mxm for the PR! Thanks @wombatu-kun for the review! |
Contributor
Author
|
Thanks for reviewing / merging @wombatu-kun @huaxingao! |
huaxingao
pushed a commit
that referenced
this pull request
Jun 19, 2026
huaxingao
pushed a commit
to huaxingao/iceberg
that referenced
this pull request
Jun 27, 2026
…OSS path) Adds a runnable proof that the ConvertEqualityDeletes Flink maintenance task converts equality deletes on a staging branch into deletion vectors (DVs) on main, leaving no equality deletes behind, on stock OSS Apache Iceberg. - flink/v2.1 PoC test (TestEqualityDeleteToDVPoc): asserts before/after state explicitly (staging has the eq-delete; after conversion main has a DV, zero eq-deletes, and reads the delete-applied rows). - poc-eq-delete-to-dv/: README, INVOCATION.md (jar build + task invocation), CUSTOMER_FLINK_SETUP.md (customer consumption). Verified passing against apache/iceberg main with all six ConvertEqualityDeletes PRs merged (apache#16831, apache#16844, apache#16858, apache#16874, apache#16889, apache#16948). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huaxingao
pushed a commit
to huaxingao/iceberg
that referenced
this pull request
Jun 27, 2026
…OSS path) Adds a runnable proof that the ConvertEqualityDeletes Flink maintenance task converts equality deletes on a staging branch into deletion vectors (DVs) on main, leaving no equality deletes behind, on stock OSS Apache Iceberg. - flink/v2.1 PoC test (TestEqualityDeleteToDVPoc): asserts before/after state explicitly (staging has the eq-delete; after conversion main has a DV, zero eq-deletes, and reads the delete-applied rows). - poc-eq-delete-to-dv/: README, INVOCATION.md (jar build + task invocation), CUSTOMER_FLINK_SETUP.md (customer consumption). Verified passing against apache/iceberg main with all six ConvertEqualityDeletes PRs merged (apache#16831, apache#16844, apache#16858, apache#16874, apache#16889, apache#16948). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jakelong95
pushed a commit
to jakelong95/iceberg
that referenced
this pull request
Jun 29, 2026
…he#16858) * Flink: Add equality delete conversion DV resolution and writing Adds EqualityConvertDVWriter, a two input operator keyed by data file path for the equality delete conversion task. It consumes the DVPositions emitted by EqualityConvertPKIndex and produces a DVWriteResult for the committer. Keying by data file path collects every position for a data file on one task, so the operator can write exactly one DV per file. Positions are buffered until the watermark reaches the cycle's plan timestamp, broadcast on the second input, at which point the operator resolves and writes the DVs. Existing DVs, including staging DVs for newly added data files, are folded into the rewrite because V3 allows only one DV per data file. Delete manifests are first pruned by partition summary to bound reads to the cycle's affected partitions rather than the table's full DV history. The operator fails fast if the main branch snapshot changed since planning. On an upstream abort signal or a write failure it emits DVWriteResult.ABORT to ensure the committer doesn't commit partial results. * fixup! Add test for changed main snapshot abort and staging-DV merge
jakelong95
pushed a commit
to jakelong95/iceberg
that referenced
this pull request
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds EqualityConvertDVWriter, a two input operator keyed by data file path for the equality delete conversion task. It consumes the DVPositions emitted by EqualityConvertPKIndex and produces a DVWriteResult for the committer. Keying by data file path collects every position for a data file on one task, so the operator can write exactly one DV per file.
Positions are buffered until the watermark reaches the cycle's plan timestamp, broadcast on the second input, at which point the operator resolves and writes the DVs.
Existing DVs, including staging DVs for newly added data files, are folded into the rewrite because V3 allows only one DV per data file. Delete manifests are first pruned by partition summary to bound reads to the cycle's affected partitions rather than the table's full DV history.
The operator fails fast if the main branch snapshot changed since planning. On an upstream abort signal or a write failure it emits DVWriteResult.ABORT to ensure the committer doesn't commit partial results.
This commit is factored out of #15996.