advancedxy commented on code in PR #11842:
URL: https://github.com/apache/iceberg/pull/11842#discussion_r1894534190
##########
core/src/main/java/org/apache/iceberg/SchemaUpdate.java:
##########
@@ -533,6 +534,25 @@ private static Schema applyChanges(
}
}
+ if (base != null) {
+ for (int fieldIdToDelete : deletes) {
+ base.specsById()
+ .forEach(
+ (specId, spec) -> {
+ // Prevent dropping fields that are referenced in older
partitions specs in use.
+ if (!specId.equals(base.defaultSpecId())) {
Review Comment:
Although, dropping partition source columns from the current spec will fail
later when building table metadata.
I don't think we should allow that here.
We should remove the if condition here as we certainly cannot remove
partition source columns in the current spec.
--
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]