advancedxy commented on code in PR #10755: URL: https://github.com/apache/iceberg/pull/10755#discussion_r1690700326
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -1102,6 +1121,22 @@ public Builder setDefaultPartitionSpec(int specId) { return this; } + private Builder removePartitionSpec(PartitionSpec spec) { + Preconditions.checkArgument( + changes.isEmpty(), "Cannot remove partition spec with other metadata update"); + Preconditions.checkArgument( + spec.specId() != defaultSpecId, "Cannot remove default partition spec"); + PartitionSpec toBeRemoved = specsById.remove(spec.specId()); Review Comment: There's one small question about this implementation, shall we remove unpartitioned spec(specId = 0) from the specs or not? It might be worthy to retain that unpartitioned 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org