clintropolis commented on code in PR #14654:
URL: https://github.com/apache/druid/pull/14654#discussion_r1275591378
##########
processing/src/main/java/org/apache/druid/query/filter/RangeFilter.java:
##########
@@ -514,10 +514,12 @@ private Supplier<DruidLongPredicate>
makeLongPredicateSupplier()
if (hasLowerBound()) {
ExprEval<?> lowerCast = lowerEval.castTo(ExpressionType.LONG);
if (lowerCast.isNumericNull()) {
+ // lower value is not null, but isn't convertible to a long, so is
effectively null, we treat this as not
+ // having a lower bound to be consistent with the bound filter, but
perhaps this is controversial...
Review Comment:
ah so I think this actually shouldn't be able to happen, because we only use
the long and double predicates if the match value type is numeric, which
basically means they must not be numeric null if also the check for the bounds
being set at all is true.
I realized this while writing some tests using string bounds on a long
column, which pushes the comparison to use the string predicate, because the
match value type is stringy and so it does lexicographical comparison instead
of numeric comparison. I left the tests because they seemed cool to have :shrug:
--
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]