Repository navigation
fix(spec): allow void partition fields whose source column was dropped - #3568
Open
ninglinLiu wants to merge 2 commits into
Open
ninglinLiu wants to merge 2 commits into
ninglinLiu wants to merge 2 commits into
Conversation
`TableMetadataBuilder::build` rebinds the default partition spec with `bind()`, which previously required every source column to exist. Java's `PartitionSpec.checkCompatibility` skips void fields, so a v1 replace that turns a removed partition into void then drops the column succeeds there and failed here. Skip the source-existence check for `Transform::Void` and cover both bind and the builder rebuild path. Fixes apache#3555
Contributor
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions. |
This branch has not been deployed
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.
Purpose
Fixes #3555.
TableMetadataBuilder::build()rebinds the default partition spec withbind(). That path required every partition source column to still exist, including forTransform::Void. Java'sPartitionSpec.checkCompatibilityskips void fields, so a v1 replace that turns a removed partition field into void and then drops the source column succeeds in Java and failed here.Changes
check_transform_compatibilityTests
cargo test -p iceberg --lib void_field_whose_sourcecargo test -p iceberg --lib default_void_spec_after_sourceAI Disclosure
AI-assisted implementation; I reviewed the change against Java's
checkCompatibilitybehavior and verified the new tests locally.