adiranjan25 opened a new pull request, #19206:
URL: https://github.com/apache/iceberg/pull/19206
## Summary
Addresses #19195.
Dynamic partition overwrite can retain existing data files
after a partition-field rename because partition replacement
is tracked using partition spec IDs and partition values.
A rename introduces a new spec ID even when the underlying
partition layout remains equivalent.
This can also prevent conflict validation from detecting
concurrent appends under an equivalent historical spec.
## Proposed fix
- Register replacement partitions across equivalent historical specs.
- Compare partition field IDs, source IDs, transforms, field order,
and partition result types.
- Allow partition field names to differ.
- Preserve existing registration behavior for the incoming spec.
- Avoid changing global PartitionSpec.compatibleWith semantics.
## Validation
- Independently reproduced 12 failing Core regression cases.
- Validated format versions 1, 2, and 3.
- Covered main and secondary branches.
- All 12 targeted regression cases passed with the candidate fix.
- Existing TestReplacePartitions suite passed.
- Spark 3.5 SQL regression passed.
- Core and Spark Spotless formatting passed.
- Git diff validation passed.
## Scope and follow-up
During testing, I also reproduced a NullPointerException when
a partition rename and append occur after a ReplacePartitions
operation has been constructed.
The same exception occurs with the original upstream production
code. That regression has been preserved separately and is not
addressed by this PR.
This PR is submitted as a draft pending further validation of
different partition layouts, delete-file handling, concurrent
metadata evolution, and the exact SQL reproduction in #19195.
Feedback on the proposed partition equivalence semantics is welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]