chenjunjiedada commented on code in PR #4683:
URL: https://github.com/apache/iceberg/pull/4683#discussion_r864591502
##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -185,16 +204,29 @@ private CloseableIterable<T>
applyEqDeletes(CloseableIterable<T> records) {
.reduce(Predicate::and)
.orElse(t -> true);
- Filter<T> remainingRowsFilter = new Filter<T>() {
+ if (hasColumnIsDeleted) {
+ return CloseableIterable.transform(records, record -> {
Review Comment:
I think these two can also be abstracted to `Deletes`
```java
public static <T> CloseableIterable<T> filter(CloseableIterable<T> rows,
Predicate<T> pred, Consumer<T> consumer) {
return CloseableIterable.transform(rows, row -> {
if (!pred.test(row)) {
consumer.accept(row);
}
return row;
});
}
```
--
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]