zabetak commented on code in PR #5978:
URL: https://github.com/apache/hive/pull/5978#discussion_r2218685398


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveUnionSimpleSelectsToInlineTableRule.java:
##########
@@ -218,6 +218,18 @@ private boolean isInlineTableOperand(RelNode input) {
     if (input.getInputs().size() == 0) {
       return true;
     }
+    RexNode call = ((HiveTableFunctionScan) input).getCall();
+    if (!(call instanceof RexCall)) {
+      return false;
+    }
+    // there should be operands present, if not return false
+    if (((RexCall) call).getOperands().size() == 0) {
+      return false;
+    }
+    // the operands should be of type RexCall, if not return false
+    if (!(((RexCall) call).getOperands().get(0) instanceof RexCall)) {
+      return false;
+    }

Review Comment:
   We will keep this for now and revisit the rule if/when it fails again.



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to