flyrain commented on code in PR #4683:
URL: https://github.com/apache/iceberg/pull/4683#discussion_r881068859
##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -226,10 +226,16 @@ private CloseableIterable<T>
applyPosDeletes(CloseableIterable<T> records) {
// 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));
+ PositionDeleteIndex positionIndex = Deletes.toPositionIndex(filePath,
deletes);
+ Predicate<T> isInDeleteSet = record ->
positionIndex.isDeleted(pos(record));
+ return hasColumnIsDeleted ?
+ Deletes.markDeleted(records, isInDeleteSet, this::markRowDeleted) :
Review Comment:
`Deletes.markDeleted` is used by eq delete as well. I'd prefer to keep it as
is. I made a new method `Deletes.filterDeleted` to make it more symmetric.
--
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]