nastra commented on code in PR #5268:
URL: https://github.com/apache/iceberg/pull/5268#discussion_r929608602
##########
api/src/main/java/org/apache/iceberg/io/CloseableIterable.java:
##########
@@ -84,6 +113,20 @@ protected boolean shouldKeep(E item) {
}, iterable);
}
+ static <E> CloseableIterable<E> filter(MetricsContext.Counter<?> counter,
CloseableIterable<E> iterable,
+ Predicate<E> pred) {
Review Comment:
this version is actually incrementing a `skip` counter. I just forgot adding
some javadocs to it.
Based on the current contract of
[FilterIterator](https://github.com/apache/iceberg/blob/bbcc2fbf6db6f5386fa9e6d169a4cc19d7883ef2/api/src/main/java/org/apache/iceberg/io/FilterIterator.java#L67),
it seems that `shouldKeep` is only called once. I tried to keep the changes
for counting skipped elements to a minimum, so is this somethind we'd want to
do in a follow-up PR?
--
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]