You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morningman (via GitHub)" <gi...@apache.org> on 2023/01/30 04:30:04 UTC

[GitHub] [doris] morningman commented on a diff in pull request #15748: [Enhancement](grouping) Add a switch for users to force using alias name in group by and having clause

morningman commented on code in PR #15748:
URL: https://github.com/apache/doris/pull/15748#discussion_r1090164777


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java:
##########
@@ -1266,7 +1272,8 @@ private void analyzeAggregation(Analyzer analyzer) throws AnalysisException {
                 groupingInfo.buildRepeat(groupingExprs, groupByClause.getGroupingSetList());
             }
 
-            substituteOrdinalsAliases(groupingExprs, "GROUP BY", analyzer, false);
+            boolean aliasFirst = ConnectContext.get().getSessionVariable().isGroupByAndHavingUseAliasFirst();

Review Comment:
   The `ConnectContext.get()` may be null when replaying edit log



-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org