HIVE-29808: Iceberg: Add guardrails to compaction with schema evolution - #6690
Open
difin wants to merge 1 commit into
Open
HIVE-29808: Iceberg: Add guardrails to compaction with schema evolution#6690difin wants to merge 1 commit into
difin wants to merge 1 commit into
Conversation
difin
force-pushed
the
guardrails_schema_evolution
branch
from
August 11, 2026 19:27
7e5089f to
6fcfe09
Compare
difin
force-pushed
the
guardrails_schema_evolution
branch
from
August 12, 2026 14:54
6fcfe09 to
20c52f1
Compare
difin
force-pushed
the
guardrails_schema_evolution
branch
from
August 12, 2026 22:21
20c52f1 to
43c624a
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.



What changes were proposed in this pull request?
Added guardrails for Iceberg partition-scoped compaction on tables that have undergone partition spec evolution, where the same partition path can match more than one historical spec. This scenario is possible with partition schema evolution with Iceberg v1 tables. Also, added more tests for partition schema evolution that cover the following cases: unpartitioned to partitioned , spec change, back to unpartitioned.
Why are the changes needed?
Iceberg compaction matches partitions by path and with Iceberg v1 tables that undergone partition schema evolution this can cause issues.
Does this PR introduce any user-facing change?
Yes, Iceberg compaction may be refused for Iceberg v1 tables that undergone partition schema evolution in case more than one partition matches the same path.
How was this patch tested?
Added more partition evolution cases to existing q-tests; Added new test class
TestIcebergTableUtilthat testsIcebergTableUtil.getPartitionSpec()against a real v1 Iceberg table built withHadoopTablesand evolved via the Iceberg API: ambiguous resolution after repeated spec changes (identity → unpartitioned → identity), a unique match after a single spec change, and failure when no spec matches the partition path.