xzj7019 commented on code in PR #38393:
URL: https://github.com/apache/doris/pull/38393#discussion_r1694915436


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/CreatePartitionTopNFromWindow.java:
##########
@@ -82,89 +66,24 @@ public Rule build() {
             LogicalWindow<Plan> window = filter.child();
 
             // We have already done such optimization rule, so just ignore it.
-            if (window.child(0) instanceof LogicalPartitionTopN
+            if (filter.getConjuncts().isEmpty()

Review Comment:
   harmless, can remove it in the future.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/CreatePartitionTopNFromWindow.java:
##########
@@ -82,89 +66,24 @@ public Rule build() {
             LogicalWindow<Plan> window = filter.child();
 
             // We have already done such optimization rule, so just ignore it.
-            if (window.child(0) instanceof LogicalPartitionTopN
+            if (filter.getConjuncts().isEmpty()

Review Comment:
   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

Reply via email to