RussellSpitzer commented on code in PR #8169:
URL: https://github.com/apache/iceberg/pull/8169#discussion_r1283646561
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -85,6 +95,29 @@ public void deleteFile(String location) {
io(location).deleteFile(location);
}
+ @Override
+ public void deleteFiles(Iterable<String> pathsToDelete) throws
BulkDeletionFailureException {
+ // peek at the first element to determine the type of FileIO
+ Iterator<String> originalIterator = pathsToDelete.iterator();
+ if (!originalIterator.hasNext()) {
+ return;
+ }
+
+ PeekingIterator<String> iterator =
Iterators.peekingIterator(originalIterator);
+ SupportsBulkOperations fileIO = io(iterator.peek());
+ fileIO.deleteFiles(() -> iterator);
Review Comment:
Did we resolve this? I think we probably want to pass the iterable here
rather than the iterator to make sure we close everything properly
--
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]