englefly commented on code in PR #38393: URL: https://github.com/apache/doris/pull/38393#discussion_r1694479744
########## 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: if filter.getConjuncts().isEmpty(), how about remove this filter? -- 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