Uh oh!
There was an error while loading. Please reload this page.
[improvement](cascades) Fuse project pushdown into join reorder - #67541
Draft
morrySnow wants to merge 1 commit into
Draft
[improvement](cascades) Fuse project pushdown into join reorder#67541morrySnow wants to merge 1 commit into
morrySnow wants to merge 1 commit into
Conversation
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: AddProjectForJoin inserts a Project above every Join before classic Cascades exploration. The standalone PushDownProjectThroughSemiJoin and PushDownProjectThroughInnerOuterJoin rules therefore expand child groups and assemble temporary plans for many slot-only Projects before rejecting them. Reuse a shared Project normalization helper from the Project-aware join reorder rules and remove the standalone rules from classic registration, while preserving their after-DPHyp registration. Local plan-only comparison kept the physical plan fingerprint and root cost unchanged for 122 TPC-H, TPC-DS, and DPHyp smoke queries. Across 12 JMH configurations, candidate mean planning time and allocation per operation were lower in every configuration; a 9-table JFR workload reduced matcher allocation by 34.4% and plan-assembly allocation by 39.4%. ### Release note Reduce Nereids classic Cascades planning overhead for queries with multiple joins. ### Check List (For Author) - Test: Unit Test - 24 targeted FE unit tests passed - FE Checkstyle passed - Behavior changed: Yes. Classic Cascades performs complex Project normalization only while producing join reorder alternatives; after-DPHyp behavior is unchanged. - Does this need documentation: No
hello-stephen
commented
Sep 4, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
morrySnow
commented
Sep 4, 2026
ContributorAuthor
run buildall |
hello-stephen
commented
Sep 4, 2026
Contributor
TPC-H: Total hot run time: 16958 ms |
hello-stephen
commented
Sep 4, 2026
Contributor
TPC-DS: Total hot run time: 81958 ms |
hello-stephen
commented
Sep 4, 2026
Contributor
ClickBench: Total hot run time: 14.59 s |
hello-stephen
commented
Sep 4, 2026
Contributor
FE UT Coverage ReportIncrement line coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
AddProjectForJoininserts aLogicalProjectabove every Join before classic Cascades exploration. Most of these Projects contain only Slots, but the standalonePushDownProjectThroughSemiJoinandPushDownProjectThroughInnerOuterJoinexploration rules still expand child groups and assemble temporary Plans before their predicates reject the match. This creates substantial CPU and allocation overhead as the Memo grows.This change:
OTHER_REORDER_RULES;AFTER_DPHYP_REORDER_RULESregistration unchanged for DPHyp.Local FE-only validation:
AddProjectForJoin -> classic optimizerpath.withGroupExprLogicalPropChildrenallocation 40.7%.All temporary instrumentation, JMH/JFR harnesses, and local analysis documents were removed from this commit.
Release note
Reduce Nereids classic Cascades planning overhead for queries with multiple joins.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)