nastra commented on code in PR #8334:
URL: https://github.com/apache/iceberg/pull/8334#discussion_r1301063842
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -95,25 +100,12 @@ public void deleteFiles(Iterable<String> pathsToDelete)
throws BulkDeletionFailu
Iterators.partition(pathsToDelete.iterator(), BATCH_SIZE)
.forEachRemaining(
partitioned -> {
- Map<FileIO, List<String>> pathByFileIO =
+ Map<DelegateFileIO, List<String>> pathByFileIO =
Review Comment:
do you think we should still batch here or would we want to essentially use
the same implementation you had?
```
// 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);
DelegateFileIO fileIO = io(iterator.peek());
fileIO.deleteFiles(() -> iterator);
```
To me it seems like batching should probably be handled by the underlying
FileIO implementation, but just wanted to see what others think?
--
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]