advancedxy commented on code in PR #10755: URL: https://github.com/apache/iceberg/pull/10755#discussion_r1830509009
########## api/src/main/java/org/apache/iceberg/ExpireSnapshots.java: ########## @@ -118,4 +118,16 @@ public interface ExpireSnapshots extends PendingUpdate<List<Snapshot>> { * @return this for method chaining */ ExpireSnapshots cleanExpiredFiles(boolean clean); + + /** + * Allows removal of unreachable partition specs as part of the expiration operation + * + * @param removeUnusedSpecs setting this to true will remove partition specs that are no longer + * reachable by any snapshot + * @return this for method chaining + */ + default ExpireSnapshots removeUnusedSpecs(boolean removeUnusedSpecs) { Review Comment: > That said, I would be fine with just having a "cleanMetadata(boolean cleanMetadata: True)" I think this is a good candidate, or we should be more specific like `cleanExpiredFiles`, we should call it `cleanExpiredMeta(boolean clean)`. WDYT? @RussellSpitzer @amogh-jahagirdar > The rationale for having the API is more REST + compatibility related. This is well thought. I'm in favor of exposing this as an API. As for the boolean parameter, I think it would be consistent with `cleanExpiredFiles` and it would be easier to call it in a fluent way when expiring files and meta are determined by external caller. -- 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