kasakrisz commented on code in PR #5196:
URL: https://github.com/apache/hive/pull/5196#discussion_r2048815903


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java:
##########
@@ -544,16 +546,24 @@ public static List<RexNode> 
transformInToOrOperands(List<RexNode> operands, RexB
       }
       for (int i = 1; i < operands.size(); i++) {
         List<RexNode> conjuncts = new 
ArrayList<>(columnExpressions.getOperands().size() - 1);
-        RexCall valueExpressions = (RexCall) operands.get(i);
-        if (!HiveCalciteUtil.isDeterministic(valueExpressions)) {
-          // Bail out
+        List<?> valueExpressions = null;
+        if (operands.get(i) instanceof RexLiteral) {
+          RexLiteral literal = (RexLiteral) operands.get(i);
+          valueExpressions = literal.getValueAs(List.class);
+        } else if (operands.get(i) instanceof RexCall) {
+          RexCall call = (RexCall) operands.get(i);
+          if (HiveCalciteUtil.isDeterministic(call)) {

Review Comment:
   The `valueExpressions` remains `null` when the function is not 
deterministic. Is this expected?



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