advancedxy commented on code in PR #10755:
URL: https://github.com/apache/iceberg/pull/10755#discussion_r1689069772


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -597,6 +597,12 @@ public TableMetadata replaceProperties(Map<String, String> 
rawProperties) {
         .build();
   }
 
+  // it's not safe for external client to call this directly, must be called by
+  // `Table.removeUnusedSpecs()`.
+  TableMetadata withSpecs(List<Integer> specIds) {
+    return new Builder(this).setSpecs(specIds).build();
+  }

Review Comment:
   The new removePartitionSpec API sounds better to me.
   
   This method(`withSpecs`) is defined in TableMetadata directly to hide the 
corresponding Builder method(`setSpecs`), so there's only one access point and 
we can build the new table metadata without other updates.



-- 
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

Reply via email to