rubenada commented on code in PR #6523:
URL: https://github.com/apache/hive/pull/6523#discussion_r3783334369
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/type/HiveFunctionHelper.java:
##########
@@ -336,6 +339,11 @@ public RexNode getExpression(String functionText,
FunctionInfo fi,
RexUtil.flatten(call.getOperands(), call.getOperator()));
}
+ // Avoid creating incorrect expressions like $1 < NULL or $1 = NULL or
NULL = NULL
+ // which may be problematic for Calcite later on
+ RexSimplify rexSimplify = new RexSimplify(rexBuilder,
RelOptPredicateList.EMPTY, RexUtil.EXECUTOR);
+ expr = rexSimplify.simplifyComparisonWithNull(expr, RexUnknownAs.UNKNOWN);
+
return expr;
Review Comment:
Done
--
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]