nastra commented on code in PR #15501:
URL: https://github.com/apache/iceberg/pull/15501#discussion_r2883151499
##########
core/src/main/java/org/apache/iceberg/CatalogUtil.java:
##########
@@ -202,6 +203,18 @@ private static void deleteFiles(FileIO io,
Set<ManifestFile> allManifests) {
});
}
+ /**
+ * Helper to delete files. Bulk deletion is used if possible, otherwise
deletions are done
+ * concurrently for non-bulk FileIO.
+ *
+ * @param io FileIO for deletes
+ * @param files files to delete
+ * @param type type of files being deleted
+ */
+ public static void deleteFiles(FileIO io, Iterable<String> files, String
type) {
Review Comment:
it's a bit inconvenient to always have to pass `true` in all call sites,
given that in pretty much all cases you'd want to do concurrent deletes anyway.
Also I think `deleteFiles(io, files, type, concurrent)` should have been
private, since there's really only a single place that passes `false` there.
I've cleaned up all of the call sites and also backported the changes to
earlier Spark versions
--
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]