-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[iceberg] Assign manifest-level row lineage for Iceberg format version 3 #9245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vbabenkoru
wants to merge
14
commits into
apache:master
Choose a base branch
from
vbabenkoru:iceberg-v3-manifest-row-lineage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c197d1f
[iceberg] Bump paimon-iceberg to Iceberg 1.11 for GA v3 validation
vbabenkoru e09e4df
[iceberg] Add first_row_id (field 520) to v3 manifest lists
vbabenkoru 8eaedd4
[iceberg] Add first_row_id (field 142) to v3 manifest entries
vbabenkoru fa266e0
[iceberg] Assign first_row_id to v3 data manifests at manifest-list w…
vbabenkoru a516234
[iceberg] Materialize inherited first_row_id when rewriting v3 manifests
vbabenkoru 4ef2752
[iceberg] Add GA reader matrix tests for v3 row-id assignment
vbabenkoru 8e5a60f
[iceberg] Close v3 lineage test-coverage gaps from verification sweep
vbabenkoru 5fda2f5
[iceberg] Count inherited legacy rows in v3 lineage accounting
vbabenkoru 83fc5dd
[iceberg] Expire Iceberg manifests by path, not value equality
vbabenkoru bf92a9a
[iceberg] Keep Iceberg 1.8.1 default, gate GA validation behind icebe…
vbabenkoru e6f5d01
[iceberg] Exclude DELETED entries from v3 row-id inheritance
vbabenkoru 9364112
[iceberg] Import local metadata wholesale when registering REST tables
vbabenkoru 29d33c8
[iceberg] Run the GA row-lineage validation as a CI workflow
vbabenkoru 1aa1241
[iceberg] Register REST tables only when the catalog supports it, wri…
vbabenkoru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| ################################################################################ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| ################################################################################ | ||
|
|
||
| name: UTCase Iceberg GA row lineage on JDK 17 | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'paimon-iceberg/**' | ||
| - 'paimon-core/**' | ||
| - 'paimon-common/**' | ||
| - 'paimon-api/**' | ||
| - 'paimon-format/**' | ||
| - 'pom.xml' | ||
| - '.github/workflows/utitcase-iceberg-ga.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'paimon-iceberg/**' | ||
| - 'paimon-core/**' | ||
| - 'paimon-common/**' | ||
| - 'paimon-api/**' | ||
| - 'paimon-format/**' | ||
| - 'pom.xml' | ||
| - '.github/workflows/utitcase-iceberg-ga.yml' | ||
|
|
||
| env: | ||
| JDK_VERSION: 17 | ||
| MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - name: Set up JDK ${{ env.JDK_VERSION }} | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: ${{ env.JDK_VERSION }} | ||
| distribution: 'temurin' | ||
| - name: Build | ||
| run: mvn -T 1C -B -ntp clean install -DskipTests -pl paimon-iceberg -am -Ppaimon-iceberg,iceberg-ga | ||
| - name: Test against GA Iceberg | ||
| run: mvn -B -ntp test -pl paimon-iceberg -Ppaimon-iceberg,iceberg-ga | ||
| env: | ||
| MAVEN_OPTS: -Xmx4096m |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Preserve lineage when compaction replaces data files
This assigns a new range to every unassigned manifest. Replacement files produced by Paimon data compaction reach this point as ADDED entries with field 142 set to null, even when they contain unchanged rows. A pure REPLACE/COMPACT commit therefore gives those rows new
_row_idvalues and a new inherited_last_updated_sequence_number. Iceberg v3 requires existing rows moved for any reason to copy both lineage values. Please carry row-level lineage into replacement data files (or keep v3 publication disabled until that is supported) and add a GA test comparing both metadata columns per logical row before and after data compaction; the current rewrite test only checks an untouched file path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually an intentional design decision described in the parent PR, #9244. I'll post a response to this in a separate comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying that this is intentional. That makes the current PR claim of completing writer-side v3 compliance with stable row IDs inaccurate, but it does not remove the correctness issue. A pure COMPACT is an Iceberg replace operation: unchanged rows moved to replacement files must retain both lineage values. This path emits replacement files as ADDED with field 142 unset and the current sequence numbers, so those values change. Iceberg requires existing rows moved for any reason to copy _row_id, while unmodified rows retain _last_updated_sequence_number (https://iceberg.apache.org/spec/#row-lineage). Please either preserve both values and add a GA before/after test per logical row, or fail/keep v3 publication explicitly unsupported for data-rewrite operations. Making the synthetic behavior another opt-in would still not make the resulting v3 table compliant.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v3 publication is currently (in the master branch and in Paimon 2.0) not gated at all (except for deletion vectors) and produces invalid v3 metadata according to spec because it is completely missing row lineage. What this set of PRs is trying to do is produce some row lineage on metadata layer, but not on data layer (making that implementation incomplete rather than missing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For real row lineage support, significant changes to the Paimon data format are necessary, including support for row lineage in PK tables, at least for compaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.