scarlin-cloudera commented on a change in pull request #970: Hive 23100
URL: https://github.com/apache/hive/pull/970#discussion_r405690477
 
 

 ##########
 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:
   Optional: Do we want to see if it's of general type 
SqlMultisetValueConstructor?  This doesn't apply to ROW though, only to the 
ARRAY_VALUE and MAP_VALUE, so maybe explicit is better, although if a new 
MultiSetValue came to be, we'd get it for free

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