RussellSpitzer commented on code in PR #7976:
URL: https://github.com/apache/iceberg/pull/7976#discussion_r1287390460
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -83,6 +86,29 @@ public void deleteFile(String location) {
io(location).deleteFile(location);
}
+ @Override
+ public void deleteFiles(Iterable<String> pathsToDelete) throws
BulkDeletionFailureException {
+ Map<FileIO, List<String>> pathByFileIO =
+ StreamSupport.stream(pathsToDelete.spliterator(), false)
+ .collect(Collectors.groupingBy(this::io));
+ for (Map.Entry<FileIO, List<String>> entries : pathByFileIO.entrySet()) {
+ FileIO io = entries.getKey();
+ if (io instanceof SupportsBulkOperations) {
+ ((SupportsBulkOperations) io).deleteFiles(entries.getValue());
Review Comment:
minor change, we can store entries.getValue() in a temp var as well. We only
use it twice, but it will probably make the code clearer if it's "fileList" or
something like that
--
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]