xuzifu666 commented on code in PR #5240:
URL: https://github.com/apache/calcite/pull/5240#discussion_r3940196510


##########
core/src/main/java/org/apache/calcite/sql/validate/AggChecker.java:
##########
@@ -87,6 +88,14 @@ boolean isGroupExpr(SqlNode e) {
       if (expr.equalsDeep(e, Litmus.IGNORE)) {
         return true;
       }
+      // A GROUP BY item may be a common column of a NATURAL/USING join that

Review Comment:
   Make sense. I consolidated the two equalsDeep calls into one by stripping 
the AS wrapper from both sides before comparing. One subtlety: measure 
expressions must be compared exactly, stripping the alias from e would make a 
select item like count_plus_100 AS x match the bare measure in measureExprs, 
and the early return in visit(SqlCall) would then bypass the naked-measure 
check in visit(SqlIdentifier).



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

Reply via email to