Baunsgaard commented on code in PR #608:
URL: https://github.com/apache/iceberg-cpp/pull/608#discussion_r3017342410
##########
src/iceberg/deletes/roaring_position_bitmap.cc:
##########
@@ -128,8 +129,27 @@ void RoaringPositionBitmap::Add(int64_t pos) {
}
void RoaringPositionBitmap::AddRange(int64_t pos_start, int64_t pos_end) {
- for (int64_t pos = pos_start; pos < pos_end; ++pos) {
- Add(pos);
+ if (pos_start > pos_end) {
+ throw std::invalid_argument("AddRange requires pos_start <= pos_end, got
[" +
Review Comment:
Well, it is an invalid input, however for consistency with other methods in
the c++ implementation, then both versions are valid.
Before my changes in the PR to the Java base, it also would not throw any
exceptions. since it used the same for loop definition. To keep the existing
behaviour, I have removed the exception throwing.
--
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]