pvary commented on code in PR #18027:
URL: https://github.com/apache/iceberg/pull/18027#discussion_r4003094388
##########
core/src/main/java/org/apache/iceberg/deletes/PositionDeleteIndex.java:
##########
@@ -79,6 +79,28 @@ 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. Implementations backed by a
bitmap can locate the
+ * containers covering the range once and walk them, instead of resolving
the container for every
+ * position.
+ *
+ * @param posStart the first position in the range, inclusive
+ * @param length the number of positions in the range
+ * @param consumer a consumer for the deleted positions in the range
+ */
+ default void forEachInRange(long posStart, int length, LongConsumer
consumer) {
Review Comment:
Other methods have `long posStart, long posEnd`. Shall we use that?
--
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]