kgyrtkirk commented on code in PR #18250:
URL: https://github.com/apache/druid/pull/18250#discussion_r2213625705


##########
processing/src/main/java/org/apache/druid/query/filter/RangeFilter.java:
##########
@@ -926,10 +950,25 @@ public static DruidDoublePredicate makeDoublePredicate(
           return DruidPredicateMatch.of((lowerComparing >= 0) && 
(upperComparing > 0));
         };
       case CLOSED:
+        if (Double.compare(lowerDoubleBound, upperDoubleBound) == 0) {
+          final long dblBits = Double.doubleToLongBits(lowerDoubleBound);
+          final int fltBits = Float.floatToIntBits((float) lowerDoubleBound);
+
+          return input -> {
+            long inDblBits = Double.doubleToLongBits(input);
+            if (inDblBits == dblBits) {
+              return DruidPredicateMatch.TRUE;
+            }
+            return DruidPredicateMatch.of(
+                Float.floatToIntBits((float) input) == fltBits
+            );

Review Comment:
   does this mean that if `(Double.compare(lowerDoubleBound, upperDoubleBound) 
== 0` is satisfied ; the predicates is weakened down to `float` level even when 
`input` is a `double` ?
   
   cc: @clintropolis 



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