Core: Support explicit row ID assignment in manifest rewrites - #17446
Draft
timothyw553 wants to merge 3 commits into
Draft
Core: Support explicit row ID assignment in manifest rewrites#17446timothyw553 wants to merge 3 commits into
timothyw553 wants to merge 3 commits into
Conversation
Generated-by: OpenAI Codex GPT-5
Validate the reserved row ID range, reject partial legacy manifest replacement and concurrent row lineage changes, and cover checkpoint continuation across a v2-to-v3 upgrade. Generated-by: Codex GPT-5
timothyw553
force-pushed
the
es-2084092-manifest-row-id-prototype
branch
from
July 31, 2026 12:41
4845214 to
725f41a
Compare
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.
Problem
Iceberg format v3 requires row IDs for data files. A large-table upgrade may calculate those assignments in parallel, but
RewriteManifestscurrently cannot reserve a caller-defined row-ID range while replacing manifests directly.This matters when the table must keep its existing snapshot ancestry. An OSS Spark streaming checkpoint stores an Iceberg snapshot ID. If an upgrade removes that snapshot from the current lineage, the stream cannot resume.
Change
This adds a low-level API for distributed manifest replacement:
ManifestFiles.rewriteDataManifestWithFirstRowIdswrites replacement data manifests containingEXISTINGentries with explicitfirst_row_idvalues.RewriteManifests.reserveRowIdRangeadvances the table'snext-row-idwhile committing those manifests.next-row-idchanges, invalid ranges, and overlaps within a manifest.Normal manifest rewrites are unchanged unless the new API is used.
Correctness requirements
A caller using this API must preserve the live data-file set, replace every current data manifest that lacks row IDs, preserve entry sequence metadata, and assign one non-overlapping row-ID range per live file.
Validation
TestRowLineageAssignmentsuitegit diff --check