pvary commented on code in PR #18027:
URL: https://github.com/apache/iceberg/pull/18027#discussion_r4036700191
##########
core/src/main/java/org/apache/iceberg/deletes/PositionDeleteIndex.java:
##########
@@ -79,6 +80,32 @@ default void forEach(LongConsumer consumer) {
}
}
+ /**
+ * Traverses the deleted positions within the given range in ascending
order, applying the
+ * provided consumer.
+ *
+ * <p>Callers that test a contiguous range of positions should prefer this
method over calling
+ * {@link #isDeleted(long)} once per position.
+ *
+ * @param posStart inclusive beginning of position range
+ * @param posEnd exclusive ending of position range
+ * @param consumer a consumer for the deleted positions in the range
+ * @throws IllegalArgumentException if posStart > posEnd
+ */
+ default void forEachInRange(long posStart, long posEnd, LongConsumer
consumer) {
Review Comment:
`PositionDeleteIndex.forEach(consumer)` only calls the `consumer` for the
position set in the index. So for only the deleted positions. This is the same
for the `forEachInRange`.
Good catch on the naming!
--
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]