Baunsgaard commented on code in PR #15791:
URL: https://github.com/apache/iceberg/pull/15791#discussion_r3015486121
##########
core/src/main/java/org/apache/iceberg/deletes/RoaringPositionBitmap.java:
##########
@@ -79,14 +79,38 @@ public void set(long pos) {
}
/**
- * Sets a range of positions in the bitmap.
+ * Sets a range of positions in the bitmap. If {@code posStartInclusive} is
greater than or equal
+ * to {@code posEndExclusive}, this method does nothing.
*
* @param posStartInclusive the start position of the range (inclusive)
* @param posEndExclusive the end position of the range (exclusive)
*/
public void setRange(long posStartInclusive, long posEndExclusive) {
- for (long pos = posStartInclusive; pos < posEndExclusive; pos++) {
- set(pos);
+ if (posStartInclusive >= posEndExclusive) {
+ return;
+ }
Review Comment:
Thanks, I changed it to error out instead.
--
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]