Skip to content

Commit 9c06f42

Browse files
committed
Simplify AddRange by removing redundant equality check
The pos_start == pos_end early return is unnecessary because the post-clamp guard (pos_start >= pos_end) already handles it. After the throw for reversed ranges, clamping can only shrink the range, so the only empty case is equality.
1 parent 6f7a1db commit 9c06f42

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/iceberg/deletes/roaring_position_bitmap.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ void RoaringPositionBitmap::AddRange(int64_t pos_start, int64_t pos_end) {
134134
std::to_string(pos_start) + ", " +
135135
std::to_string(pos_end) + ")");
136136
}
137-
if (pos_start == pos_end) {
138-
return;
139-
}
140137
pos_start = std::max(pos_start, int64_t{0});
141138
pos_end = std::min(pos_end, kMaxPosition + 1);
142139
if (pos_start >= pos_end) {

0 commit comments

Comments
 (0)