rdblue commented on a change in pull request #2320:
URL: https://github.com/apache/iceberg/pull/2320#discussion_r599992004



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

Review comment:
       Why doesn't this return a single predicate, `isDeleted`? Both 
`findEqualityDeleteRows` and `applyEqDeletes` end up producing a Predicate that 
determines whether a row is deleted. The only difference is that `deletedRows` 
and `remainingRows` are negations of each other. But those methods could just 
as easily use `isDeleted` and negate in `shouldKeep`.




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

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