jcamachor commented on a change in pull request #970: Hive 23100
URL: https://github.com/apache/hive/pull/970#discussion_r406488204
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java
 ##########
 @@ -1062,6 +1060,25 @@ public RexNode apply(RelDataTypeField input) {
     return HiveProject.create(input, copyInputRefs, null);
   }
 
+  public static boolean isConstant(RexNode expr) {
+    if (expr instanceof RexCall) {
+      RexCall call = (RexCall) expr;
+      if (call.getOperator() == SqlStdOperatorTable.ROW ||
+          call.getOperator() == SqlStdOperatorTable.ARRAY_VALUE_CONSTRUCTOR ||
+          call.getOperator() == SqlStdOperatorTable.MAP_VALUE_CONSTRUCTOR) {
 
 Review comment:
   I think support to recognize `SqlMultisetValueConstructor` would need to be 
added in other places too in any case... We can leave it more explicit for the 
time being and generalize later on if needed. Fwiw this call is also very 
specific to Hive and how it handles the initialization of UDFs with parameters 
that are constant; otherwise, we would not need it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to