singhpk234 commented on code in PR #5459:
URL: https://github.com/apache/iceberg/pull/5459#discussion_r940326491


##########
core/src/main/java/org/apache/iceberg/CatalogUtil.java:
##########
@@ -102,6 +106,16 @@ public static void dropTableData(FileIO io, TableMetadata 
metadata) {
       deleteFiles(io, manifestsToDelete);
     }
 
+    if (io instanceof SupportsBulkOperations) {
+      SupportsBulkOperations bulkFileIO = (SupportsBulkOperations) io;
+      bulkFileIO.deleteFiles(Iterables.transform(manifestsToDelete, 
ManifestFile::path));
+      bulkFileIO.deleteFiles(manifestListsToDelete);
+      bulkFileIO.deleteFiles(
+          Iterables.transform(metadata.previousFiles(), 
TableMetadata.MetadataLogEntry::file));
+      
bulkFileIO.deleteFiles(ImmutableList.of(metadata.metadataFileLocation()));

Review Comment:
   [question] can we concat all the iterators into 1 iterator and call 
bulkFileIO#deleteFiles only once WDYT ? 



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