starocean999 commented on code in PR #12313: URL: https://github.com/apache/doris/pull/12313#discussion_r964608877
########## fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java: ########## @@ -444,13 +444,18 @@ public void analyze(Analyzer analyzer) throws UserException { } } if (groupByClause != null && groupByClause.isGroupByExtension()) { + ArrayList<Expr> aggFnExprList = new ArrayList<>(); for (SelectListItem item : selectList.getItems()) { - if (item.getExpr() instanceof FunctionCallExpr && item.getExpr().fn instanceof AggregateFunction) { + aggFnExprList.clear(); + getAggregateFnExpr(item.getExpr(), aggFnExprList); + if (!aggFnExprList.isEmpty()) { Review Comment: this is more clear and simple: `for (Expr aggFnExpr : aggFnExprList) { for (Expr expr : groupByClause.getGroupingExprs()) { .... } }` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org