morrySnow commented on code in PR #26899:
URL: https://github.com/apache/doris/pull/26899#discussion_r1395061699


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java:
##########
@@ -70,6 +72,17 @@ private void checkUnexpectedExpression(Plan plan) {
         if (plan.getExpressions().stream().anyMatch(e -> 
e.anyMatch(SubqueryExpr.class::isInstance))) {
             throw new AnalysisException("Subquery is not allowed in " + 
plan.getType());
         }
+        if (plan instanceof LogicalWindow) {

Review Comment:
   why check here? not in ExtractAndNormalizeWindowExpression?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java:
##########
@@ -70,6 +72,17 @@ private void checkUnexpectedExpression(Plan plan) {
         if (plan.getExpressions().stream().anyMatch(e -> 
e.anyMatch(SubqueryExpr.class::isInstance))) {
             throw new AnalysisException("Subquery is not allowed in " + 
plan.getType());
         }
+        if (plan instanceof LogicalWindow) {
+            if (ExpressionUtils.collect(plan.getExpressions(), 
WindowExpression.class::isInstance)
+                    .stream()
+                    .anyMatch(expression -> ((WindowExpression) 
expression).getOrderKeys().stream()
+                                    .map(orderExpression -> 
orderExpression.getOrderKey().getExpr())
+                                    .anyMatch(Literal.class::isInstance))) {

Review Comment:
   why not push them down lick partition by key?



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