richardstartin commented on a change in pull request #7435:
URL: https://github.com/apache/pinot/pull/7435#discussion_r709628801



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/RangeIndexReaderImpl.java
##########
@@ -217,4 +272,26 @@ public void close() {
     // NOTE: DO NOT close the PinotDataBuffer here because it is tracked by 
the caller and might be reused later. The
     // caller is responsible of closing the PinotDataBuffer.
   }
+
+  private ImmutableRoaringBitmap getMatchesInRange(int firstRangeId, int 
lastRangeId) {
+    if (firstRangeId == lastRangeId) {
+      return null;
+    }
+    MutableRoaringBitmap matching = new MutableRoaringBitmap();
+    for (int rangeId = firstRangeId + 1; rangeId < lastRangeId; ++rangeId) {

Review comment:
       No, this is correct. `firstRangeId == 0` means that the lower bound was 
below the lowest bucket, so range 0 (`firstRangeId + 1`) is within the range of 
the query so long as `lastRangeId > 0`. Similarly, a `lastRangeId == -1` means 
that the upper bound of the query was below the first range, which means that 
none of the rows are within the range of the query, so an empty bitmap is 
produced.




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to