nastra commented on code in PR #15501:
URL: https://github.com/apache/iceberg/pull/15501#discussion_r2878642557


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java:
##########
@@ -84,34 +84,13 @@ private static String taskInfo() {
    */
   public static void deleteFiles(String context, FileIO io, List<? extends 
ContentFile<?>> files) {
     List<String> paths = Lists.transform(files, ContentFile::location);
-    deletePaths(context, io, paths);
-  }
-
-  private static void deletePaths(String context, FileIO io, List<String> 
paths) {
     if (io instanceof SupportsBulkOperations) {
-      SupportsBulkOperations bulkIO = (SupportsBulkOperations) io;
-      bulkDelete(context, bulkIO, paths);
+      CatalogUtil.deleteFiles(io, paths, "");
     } else {
       delete(context, io, paths);

Review Comment:
   ideally we would fully delegate to `CatalogUtil.deleteFiles` here as well, 
but there is custom retry logic here that we don't use in `CatalogUtil`



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