amogh-jahagirdar commented on code in PR #14287:
URL: https://github.com/apache/iceberg/pull/14287#discussion_r2448594513


##########
core/src/main/java/org/apache/iceberg/IncrementalFileCleanup.java:
##########
@@ -251,11 +252,15 @@ public void cleanFiles(TableMetadata beforeExpiration, 
TableMetadata afterExpira
               }
             });
 
-    Set<String> filesToDelete =
-        findFilesToDelete(
-            manifestsToScan, manifestsToRevert, validIds, 
beforeExpiration.specsById());
+    if (CleanupMode.ALL == cleanupMode) {
+      Set<String> filesToDelete =
+          findFilesToDelete(
+              manifestsToScan, manifestsToRevert, validIds, 
beforeExpiration.specsById());
+      LOG.debug("Deleting {} data files", filesToDelete.size());
+      deleteFiles(filesToDelete, "data");
+    }
 
-    deleteFiles(filesToDelete, "data");
+    LOG.debug("Deleting {} manifest files", manifestsToDelete.size());
     deleteFiles(manifestsToDelete, "manifest");

Review Comment:
   @nastra that's done higher in the stack before creating a cleanup strategy, 
https://github.com/apache/iceberg/pull/14287/files#diff-df69f223758fd7769fe37794088bafad268f076cd6cab5401d35969a7756b585R374
  



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

Reply via email to