bryanck commented on code in PR #8169:
URL: https://github.com/apache/iceberg/pull/8169#discussion_r1283649333
##########
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:
No not yet, I'm still thinking through the best solution. Passing the
original iterable could cause an additional request to be made, i.e. one
additional request for the peek, so I was hoping to avoid 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]