flyrain commented on code in PR #4539:
URL: https://github.com/apache/iceberg/pull/4539#discussion_r856669198
##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -226,10 +266,14 @@ 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));
+ return hasMetadataColumnIsDeleted ?
+ Deletes.marker(records, this::pos, Deletes.toPositionIndex(filePath,
deletes), this::markRowDeleted) :
Review Comment:
We can definitely refactor here. I've got some ideas in my mind. Trying to
understand your point here. Do you mean a class `DeleteStream` combine both
functionality from `PositionSetDeleteFilter` and `PositionSetDeleteMarker`? I
will test these ideas anyway. Thanks for the suggestion.
--
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]