morrySnow commented on code in PR #11246: URL: https://github.com/apache/doris/pull/11246#discussion_r930692117
########## fe/fe-core/src/main/java/org/apache/doris/analysis/AggregateInfo.java: ########## @@ -283,6 +285,12 @@ public static boolean estimateIfContainsMultiDistinct(List<FunctionCallExpr> dis hasMultiDistinct = true; } } + + // for vectorized execution, we force it to using hash set to execution + if (!hasMultiDistinct && distinctAggExprs.size() == 1 && distinctAggExprs.get(0).getFnParams().isDistinct() + && VectorizedUtil.isVectorized() && ConnectContext.get().getSessionVariable().enableSingleDistinctColumnOpt()) { + hasMultiDistinct = true; Review Comment: nit: if we use 2 stage aggregate for one distinct aggregate, maybe we should change function name and variable name to get a better description of what's actually being done -- 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