openinx commented on a change in pull request #2372:
URL: https://github.com/apache/iceberg/pull/2372#discussion_r608625922
##########
File path: core/src/main/java/org/apache/iceberg/deletes/Deletes.java
##########
@@ -233,6 +246,37 @@ public void close() {
}
}
+ static class PositionStreamDeletedRowMarker<T> extends
PositionStreamDeleteFilter<T> {
+ private final Consumer<T> deleteMarker;
+
+ private PositionStreamDeletedRowMarker(CloseableIterable<T> rows,
Function<T, Long> extractPos,
+ CloseableIterable<Long>
deletePositions,
+ Consumer<T> deleteMarker) {
+ super(rows, extractPos, deletePositions);
+ this.deleteMarker = deleteMarker;
+ }
+
+ @Override
+ protected FilterIterator<T> positionIterator(CloseableIterator<T> items,
+ CloseableIterator<Long>
deletePositions) {
+ return new PositionMarkerIterator(items, deletePositions);
+ }
+
+ private class PositionMarkerIterator extends PositionFilterIterator {
+ protected PositionMarkerIterator(CloseableIterator<T> items,
CloseableIterator<Long> deletePositions) {
+ super(items, deletePositions);
+ }
+
+ @Override
+ protected boolean shouldKeep(T row) {
+ if (!super.shouldKeep(row)) {
+ deleteMarker.accept(row);
Review comment:
I'm trying to add a `DeleteMarker` to add the `_is_deleted` flag
iteratively, pls see the PR https://github.com/apache/iceberg/pull/2434
--
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]