pvary commented on code in PR #4588:
URL: https://github.com/apache/iceberg/pull/4588#discussion_r960232615
##########
core/src/main/java/org/apache/iceberg/deletes/Deletes.java:
##########
@@ -74,9 +75,24 @@ public static <T> CloseableIterable<T> markDeleted(
});
}
+ /**
+ * Returns the remaining rows (the ones that are not deleted), while
counting the deleted ones.
+ */
public static <T> CloseableIterable<T> filterDeleted(
- CloseableIterable<T> rows, Predicate<T> isDeleted) {
- return CloseableIterable.filter(rows, isDeleted.negate());
+ CloseableIterable<T> rows, Predicate<T> isDeleted, DeleteCounter
counter) {
+ Filter<T> remainingRowsFilter =
+ new Filter<T>() {
+ @Override
+ protected boolean shouldKeep(T item) {
+ boolean deleted = isDeleted.test(item);
+ if (deleted) {
+ counter.increment();
+ }
Review Comment:
Nit: new line after the block
--
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]