github-actions[bot] commented on code in PR #64559:
URL: https://github.com/apache/doris/pull/64559#discussion_r3480949532
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupExpressionJob.java:
##########
@@ -111,10 +109,10 @@ private List<Rule> getJoinRules() {
return getRuleSet().getDPHypReorderRules();
} else if (isAfterDpHyper) {
return getRuleSet().getAfterDPHypReorderRules();
- } else if (isLeftZigZagTree) {
- return getRuleSet().getLeftZigZagTreeJoinReorder();
} else if (isEnableBushyTree) {
return getRuleSet().getBushyTreeJoinReorder();
+ } else if (isLeftZigZagTree) {
Review Comment:
This branch reorder makes `enable_bushy_tree=true` override the existing
unreliable-stats fallback. When `StatsCalculator` marks the join group
unreliable because the join expressions use unknown column stats, the old code
returned `getLeftZigZagTreeJoinReorder()` before considering
`enable_bushy_tree`; the local `RuleSet` comment says that left-zig-zag is the
path used when column stats are not available, and its commute/LAsscom rules
keep the exploration constrained by row-count checks.
With the new order, the same shape now selects the full bushy rule set
whenever the session has `enable_bushy_tree=true`:
```text
Project
Join group G, G.isStatsReliable=false
Join(A, B)
C
```
That bypasses the stats-unavailable fallback and can explore/cost bushy
alternatives using unreliable stats. Please keep the `isLeftZigZagTree` branch
ahead of `isEnableBushyTree`, or only let an explicit bushy request override
the fallback when the owner group statistics are reliable.
--
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]