cristianpop commented on code in PR #18729:
URL: https://github.com/apache/pinot/pull/18729#discussion_r3435381978
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RexExpressionUtils.java:
##########
@@ -350,20 +351,22 @@ private static RexExpression handleSearch(RexCall
rexCall) {
if (leftOperand instanceof RexLiteral) {
return evaluateLiteralIn((RexLiteral) leftOperand,
sarg.rangeSet.asRanges());
Review Comment:
@yashmayya I updated the PR to include your suggestions but I cannot return
null in case of a null literal with Unknown nullAs because it would lead to
issues in other parts of the code that rely on the returned expression not
being null. So I ended up:
- Falling back to previous behaviour for IN/NOT IN in case of null literals
with Unknown nullAs (should return false if I'm not missing anything - I could
optimise it to return false earlier)
- Returning false on RANGE in case of null literals with Unknown nullAs
because it doesn't support null literals just as you noticed (maybe if there
are no ranges it would make sense to return true instead, but Sarg doesn't seem
to support empty range sets so it's probably not needed)
--
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]