clintropolis commented on code in PR #15974:
URL: https://github.com/apache/druid/pull/15974#discussion_r1517146680


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:
##########
@@ -83,7 +83,11 @@ public void reduce(
         final RexNode literal;
 
         if (sqlTypeName == SqlTypeName.BOOLEAN) {
-          literal = rexBuilder.makeLiteral(exprResult.asBoolean(), 
constExp.getType(), true);
+          if (exprResult.valueOrDefault() == null) {

Review Comment:
   oh i guess the behavior change would be changing the native 
array_contains/array_overlap functions to not return null except in some cases.
   
   This part of the code is actually a bug fix, since previously boolean 
constants weren't properly allowed to be null even though the native function 
might have been a null result, which I guess is a sort of behavior change 
though the previous behavior was certainly incorrect because the behavior of 
constant expressions that were considered boolean didn't match non-constant 
expressions. 



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