Skip to content

Core: Add regression tests for GH-16217 drop partition field + drop column#16234

Open
sshivampeta wants to merge 1 commit intoapache:mainfrom
sshivampeta:core/issue-16217-metadata-partitions-regression-tests
Open

Core: Add regression tests for GH-16217 drop partition field + drop column#16234
sshivampeta wants to merge 1 commit intoapache:mainfrom
sshivampeta:core/issue-16217-metadata-partitions-regression-tests

Conversation

@sshivampeta
Copy link
Copy Markdown

Summary

This PR adds core-level regression coverage for #16217, which reports an unrecoverable table state after running DROP PARTITION FIELD followed by DROP COLUMN on an identity-partitioned source column.

What’s covered

.partitions metadata table remains queryable after dropping a partition field and then dropping the former source column.
Re-adding the dropped column name (same column name, new field ID) succeeds after the drop sequence.

Notes / context

The original issue is reported against Iceberg 1.10.1 (Spark 3.5.8). On current main, the core behavior appears fixed; these tests prevent regressions.
This is core-only coverage (no Spark SQL / HMS integration in this PR).

Test plan

./gradlew :iceberg-core:test --tests org.apache.iceberg.TestMetadataTableScansWithPartitionEvolution.testPartitionsTableWithDroppedPartitionSourceColumn

./gradlew :iceberg-core:test --tests org.apache.iceberg.TestMetadataTableScansWithPartitionEvolution.testReAddDroppedPartitionSourceColumnName

Issue link

Relates to #16217.

Files changed

core/src/test/java/org/apache/iceberg/TestMetadataTableScansWithPartitionEvolution.java (adds 2 regression tests)

authored-by: Shivakumar Shivampeta

@github-actions github-actions Bot added the core label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant