morrySnow commented on code in PR #25800: URL: https://github.com/apache/doris/pull/25800#discussion_r1377027710
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubExprAnalyzer.java: ########## @@ -223,6 +220,15 @@ public boolean hasGroupBy() { return false; } + public boolean hasCorrelatedSlotsUnderAgg() { + if (!correlatedSlots.isEmpty()) { + return logicalPlan.anyMatch(planTreeNode -> planTreeNode instanceof LogicalAggregate Review Comment: this impl is inefficient. we should stop traverse when we meed the first agg node -- 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