maytasm commented on code in PR #12830:
URL: https://github.com/apache/druid/pull/12830#discussion_r932725393


##########
processing/src/main/java/org/apache/druid/segment/filter/BoundFilter.java:
##########
@@ -75,71 +76,107 @@ public BitmapColumnIndex 
getBitmapColumnIndex(ColumnIndexSelector selector)
     if (!Filters.checkFilterTuningUseIndex(boundDimFilter.getDimension(), 
selector, filterTuning)) {
       return null;
     }
-    if (supportShortCircuit()) {
+    if (supportStringShortCircuit()) {
       final ColumnIndexSupplier indexSupplier = 
selector.getIndexSupplier(boundDimFilter.getDimension());
       if (indexSupplier == null) {
         return Filters.makeNullIndex(doesMatchNull(), selector);
       }
       final LexicographicalRangeIndex rangeIndex = 
indexSupplier.as(LexicographicalRangeIndex.class);
-      if (rangeIndex == null) {
-        // column
-        return null;
+      if (rangeIndex != null) {
+        final BitmapColumnIndex rangeBitmaps = rangeIndex.forRange(
+            boundDimFilter.getLower(),
+            boundDimFilter.isLowerStrict(),
+            boundDimFilter.getUpper(),
+            boundDimFilter.isUpperStrict()
+        );
+        // preserve sad backwards compatible behavior where bound filter 
matches 'null' if the lower bound is not set

Review Comment:
   I think this can be refactor outside of the if as it is common to both the 
String and the Numeric



-- 
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]

Reply via email to