englefly commented on code in PR #70434:
URL: https://github.com/apache/doris/pull/70434#discussion_r4583019975


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ReorderJoin.java:
##########
@@ -134,9 +135,10 @@ public Rule build() {
      * --> {@link MultiJoin}
      */
     public Plan joinToMultiJoin(Plan plan, Map<Plan, DistributeHint> 
planToHintType) {
-        // subtree can't specify the end of Pattern. so end can be GroupPlan 
or Filter
+        // A top-down retry can reach child filters before MergeFilters has 
merged them.
+        // Preserve filters without a direct join child as join-cluster 
boundaries.
         if (nonJoinAndNonFilter(plan)
-                || (plan instanceof LogicalFilter && 
nonJoinAndNonFilter(plan.child(0)))) {

Review Comment:
   这个修改方式会使得join cluser 变小, 从而丢掉了一些优化空间. 建议遇到连续的filter,先merge filter(类似 merge 
project), 然后再使用现有的逻辑. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to