YangShaw commented on code in PR #14397:
URL: https://github.com/apache/doris/pull/14397#discussion_r1094411155


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -1437,12 +1530,19 @@ private LogicalPlan withProjection(LogicalPlan input, 
SelectColumnClauseContext
                             expressions, input, isDistinct);
                 } else {
                     List<NamedExpression> projects = 
getNamedExpressions(selectCtx.namedExpressionSeq());
-                    return new LogicalProject<>(projects, ImmutableList.of(), 
input, isDistinct);
+                    if (containsWindowExpressions(projects)) {
+                        return new LogicalWindow<>(projects, input);
+                    }
+                    return new LogicalProject<>(projects, 
Collections.emptyList(), input, isDistinct);

Review Comment:
   nice idea~



-- 
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

Reply via email to