kasakrisz commented on code in PR #5749:
URL: https://github.com/apache/hive/pull/5749#discussion_r2038903234


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -3800,19 +3800,25 @@ private RelNode genGBLogicalPlan(QB qb, RelNode srcRel) 
throws SemanticException
         groupByOutputRowResolver.setIsExprResolver(true);
 
         if (hasGrpByAstExprs) {
-          // 4. Construct GB Keys (ExprNode)
-          for (int i = 0; i < groupByNodes.size(); ++i) {
-            ASTNode groupByNode = groupByNodes.get(i);
-            Map<ASTNode, RexNode> astToRexNodeMap = genAllRexNode(
-                groupByNode, groupByInputRowResolver, cluster.getRexBuilder());
-            RexNode groupByExpression = astToRexNodeMap.get(groupByNode);
-            if (groupByExpression == null) {
-              throw new CalciteSemanticException("Invalid Column Reference: " 
+ groupByNode.dump(),
-                  UnsupportedFeature.Invalid_column_reference);
-            }
+          try {
+            groupByInputRowResolver.setCheckForAmbiguity(true);
+            // 4. Construct GB Keys (ExprNode)
+            for (int i = 0; i < groupByNodes.size(); ++i) {

Review Comment:
   replaced to foreach



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to