github-actions[bot] commented on code in PR #67067:
URL: https://github.com/apache/doris/pull/67067#discussion_r4043927195


##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java:
##########
@@ -131,6 +131,8 @@ public class MTMVPlanUtil {
             RuleType.ELIMINATE_GROUP_BY_KEY_BY_UNIFORM,
             RuleType.ELIMINATE_GROUP_BY_KEY,
             RuleType.ELIMINATE_GROUP_BY,
+            // Preserve the join structure used by FK-based MV matching.
+            RuleType.REORDER_JOIN_BEFORE_EAGER_AGG,
             RuleType.SALT_JOIN

Review Comment:
   [P2] Retain initial ordering for MTMV refresh tasks
   
   This entry is in the cache-generation list, but 
`DISABLE_RULES_WHEN_RUN_MTMV_TASK` aliases that list, so scheduled/manual 
refresh plans skip the rule too. Before this PR, `InitJoinOrder` still ran in 
those contexts: for a memo-capped `Aggregate -> Join(A_small, F_huge)`, it put 
the small input on the right and unlocked the small-broadcast eager path; now 
the task has neither that swap nor its replacement, and later CBO cannot rerun 
eager aggregation. The cache-matching rationale does not require this execution 
mask—refresh planning disables MV rewrite, and IVM signature generation 
finishes in `Analyzer` before this `Rewriter` stage. Please split the 
cache/task masks (or retain an equivalent task-side pass) and add an `EXPLAIN 
REFRESH`/refresh-plan regression.
   



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