scarlin-cloudera commented on a change in pull request #970: Hive 23100
URL: https://github.com/apache/hive/pull/970#discussion_r405687141
##########
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) {
+ // We check all operands
+ for (RexNode node : ((RexCall) expr).getOperands()) {
Review comment:
call.getOperands()
----------------------------------------------------------------
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]