You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/12/14 23:42:53 UTC

[GitHub] [calcite] jbalint commented on a diff in pull request #2745: [CALCITE-4512] GROUP BY expression with argument name same with SELEC…

jbalint commented on code in PR #2745:
URL: https://github.com/apache/calcite/pull/2745#discussion_r1049077069


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -6590,20 +6593,25 @@ static class ExtendedExpander extends Expander {
     final SqlSelect select;
     final SqlNode root;
     final boolean havingExpr;
+    final Set<SqlNode> aliasOrdinalExpandSet = Sets.newIdentityHashSet();
 
     ExtendedExpander(SqlValidatorImpl validator, SqlValidatorScope scope,
         SqlSelect select, SqlNode root, boolean havingExpr) {
       super(validator, scope);
       this.select = select;
       this.root = root;
       this.havingExpr = havingExpr;
+      if (!havingExpr) {
+        addExpandableExpressions();
+      }
     }
 
     @Override public @Nullable SqlNode visit(SqlIdentifier id) {
       if (id.isSimple()
           && (havingExpr
               ? validator.config().conformance().isHavingAlias()
-              : validator.config().conformance().isGroupByAlias())) {
+              : (validator.config().conformance().isGroupByAlias()

Review Comment:
   @hannerwang are you able to respond and get this PR merged?



-- 
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: commits-unsubscribe@calcite.apache.org

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