jcamachor commented on a change in pull request #693: HIVE-21921: Support for
correlated quantified predicates
URL: https://github.com/apache/hive/pull/693#discussion_r299578022
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSubQueryRemoveRule.java
##########
@@ -592,6 +616,20 @@ public static RexSubQuery find(RexNode node) {
}
}
+ public static void subqueryRestriction(RelNode relNode) {
+ if(relNode instanceof HiveAggregate) {
+ HiveAggregate aggregate = (HiveAggregate)relNode;
+ if(!aggregate.getAggCallList().isEmpty() &&
aggregate.getGroupSet().isEmpty()) {
+ throw new CalciteSubqueryRuntimeException("Subquery rewrite:
Aggregate without group by is not allowed");
+ }
+ } else if(relNode instanceof HiveProject
+ || relNode instanceof HiveFilter) {
+ subqueryRestriction(relNode.getInput(0));
+ } else {
+ return;
Review comment:
This is not needed?
----------------------------------------------------------------
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]