wypoon commented on code in PR #4588:
URL: https://github.com/apache/iceberg/pull/4588#discussion_r937370595
##########
core/src/main/java/org/apache/iceberg/deletes/Deletes.java:
##########
@@ -202,17 +233,24 @@ boolean isDeleted(T row) {
}
private static class PositionStreamDeleteFilter<T> extends
PositionStreamDeleteIterable<T> {
- private PositionStreamDeleteFilter(CloseableIterable<T> rows, Function<T,
Long> rowToPosition,
- CloseableIterable<Long>
deletePositions) {
+ private final DeleteCounter counter;
+
+ PositionStreamDeleteFilter(CloseableIterable<T> rows, Function<T, Long>
rowToPosition,
+ CloseableIterable<Long> deletePositions,
DeleteCounter counter) {
super(rows, rowToPosition, deletePositions);
+ this.counter = counter;
}
@Override
protected CloseableIterator<T> applyDelete(CloseableIterator<T> items) {
return new FilterIterator<T>(items) {
@Override
protected boolean shouldKeep(T item) {
- return !isDeleted(item);
+ boolean deleted = isDeleted(item);
+ if (deleted) {
+ counter.increment();
+ }
+ return !deleted;
Review Comment:
I ran `IcebergSourceParquetPosDeleteBenchmark` before and after this change,
and the numbers for `readIceberg` show hardly any difference.
--
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]