openinx commented on a change in pull request #2364:
URL: https://github.com/apache/iceberg/pull/2364#discussion_r678134390



##########
File path: data/src/main/java/org/apache/iceberg/data/DeleteFilter.java
##########
@@ -139,43 +173,122 @@ protected long pos(T record) {
           CloseableIterable.transform(CloseableIterable.concat(deleteRecords), 
Record::copy),
           deleteSchema.asStruct());
 
-      Predicate<T> isInDeleteSet = record -> 
deleteSet.contains(projectRow.wrap(asStructLike(record)));
-      isInDeleteSets.add(isInDeleteSet);
+      isDeleted = isDeleted == null ? record -> 
deleteSet.contains(projectRow.wrap(asStructLike(record))) :

Review comment:
       Initializing the `isDeleted` as a predicate like`t->false`  will 
simplify this if-else as: 
   
   ```java
   isDeleted = isDeleted.or(record -> 
deleteSet.contains(projectRow.wrap(asStructLike(record))));
   ```




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