wypoon commented on code in PR #4588:
URL: https://github.com/apache/iceberg/pull/4588#discussion_r879949910


##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -225,18 +257,19 @@ private CloseableIterable<T> 
applyPosDeletes(CloseableIterable<T> records) {
     List<CloseableIterable<Record>> deletes = Lists.transform(posDeletes, 
this::openPosDeletes);
 
     // if there are fewer deletes than a reasonable number to keep in memory, 
use a set
-    if (posDeletes.stream().mapToLong(DeleteFile::recordCount).sum() < 
setFilterThreshold) {
-      return Deletes.filter(records, this::pos, 
Deletes.toPositionIndex(filePath, deletes));
+    if (posDeletes.stream().mapToLong(DeleteFile::recordCount).sum() < 
streamFilterThreshold) {
+      return Deletes.filter(records, this::pos, 
Deletes.toPositionIndex(filePath, deletes, counter));
     }
 
-    return Deletes.streamingFilter(records, this::pos, 
Deletes.deletePositions(filePath, deletes));
+    return Deletes.streamingFilter(records, this::pos, 
Deletes.deletePositions(filePath, deletes), counter);

Review Comment:
   This is a code path that was not previously exercised by the unit tests.
   We add a configuration that allows us to control the `streamFilterThreshold` 
and cause this code path to be taken.



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