amogh-jahagirdar commented on code in PR #13614:
URL: https://github.com/apache/iceberg/pull/13614#discussion_r2225866011
##########
core/src/main/java/org/apache/iceberg/RemoveSnapshots.java:
##########
@@ -365,17 +365,13 @@ ExpireSnapshots withIncrementalCleanup(boolean
useIncrementalCleanup) {
private void cleanExpiredSnapshots() {
TableMetadata current = ops.refresh();
- if (specifiedSnapshotId) {
- if (incrementalCleanup != null && incrementalCleanup) {
- throw new UnsupportedOperationException(
- "Cannot clean files incrementally when snapshot IDs are
specified");
- }
-
- incrementalCleanup = false;
- }
-
- if (incrementalCleanup == null) {
- incrementalCleanup = current.refs().size() == 1;
+ if (Boolean.TRUE.equals(incrementalCleanup)) {
+ validateCleanupCanBeIncremental(current);
+ } else {
+ incrementalCleanup =
Review Comment:
This doesn't properly handle the case where incremental cleanup was
explicitly set to false
--
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]