morrySnow commented on code in PR #50256: URL: https://github.com/apache/doris/pull/50256#discussion_r2059481915
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/ScalarSubquery.java: ########## @@ -42,25 +42,33 @@ public class ScalarSubquery extends SubqueryExpr { private final boolean hasTopLevelScalarAgg; + private final boolean limitOneIsEliminated; Review Comment: add some comment to explain these flags ########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubqueryToApply.java: ########## @@ -406,7 +407,7 @@ private Pair<LogicalPlan, Optional<Expression>> addApply(SubqueryExpr subquery, Optional<MarkJoinSlotReference> markJoinSlot = subqueryToMarkJoinSlot.get(subquery); boolean needAddScalarSubqueryOutputToProjects = isConjunctContainsScalarSubqueryOutput( subquery, conjunct, isProject, singleSubquery); - boolean needRuntimeAssertCount = false; + boolean needRuntimeAnyValue = false; Review Comment: add comment ########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubExprAnalyzer.java: ########## @@ -124,13 +124,15 @@ public Expression visitScalarSubquery(ScalarSubquery scalar, T context) { boolean isCorrelated = analyzedResult.isCorrelated(); LogicalPlan analyzedSubqueryPlan = analyzedResult.logicalPlan; checkOutputColumn(analyzedSubqueryPlan); + boolean limitOneIsEliminated = false; Review Comment: add comment ########## fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Analyzer.java: ########## @@ -152,8 +151,7 @@ private static List<RewriteJob> buildAnalyzerJobs() { ), topDown(new LeadingJoin()), bottomUp(new NormalizeGenerate()), - bottomUp(new SubqueryToApply()), - topDown(new MergeProjects()) + bottomUp(new SubqueryToApply()) Review Comment: add a NOTICE comment, to avoid add a mergeprojects affter subqueryToApply -- 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