bryanck commented on code in PR #8169:
URL: https://github.com/apache/iceberg/pull/8169#discussion_r1283353807


##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -85,6 +95,31 @@ 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);
+    FileIO fileIO = io(iterator.peek());

Review Comment:
   Thanks for the suggestion, I made this change and removed the typecasts.



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