Skip to content

branch:4.2: [improvement](cascades) Fuse project pushdown into join reorder #67541 - #68289

Merged
yiguolei merged 3 commits into
apache:branch-4.2from
morrySnow:pick-67541-to-branch-4.2
Sep 22, 2026
Merged

yiguolei merged 3 commits into
apache:branch-4.2from
morrySnow:pick-67541-to-branch-4.2

Conversation

@morrySnow

Copy link
Copy Markdown
Contributor

picked from #67541

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

Reduce Nereids classic Cascades planning overhead for queries with multiple joins.

- 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
@morrySnow
morrySnow requested a review from yiguolei as a code owner September 20, 2026 18:40
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morrySnow

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 84.15% (154/183) 🎉
Increment coverage report
Complete coverage report

@morrySnow morrySnow changed the title branch:4.1: [improvement](cascades) Fuse project pushdown into join reorder #67541 branch:4.2: [improvement](cascades) Fuse project pushdown into join reorder #67541 Sep 20, 2026
@morrySnow

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 77.60% (142/183) 🎉
Increment coverage report
Complete coverage report

@morrySnow

Copy link
Copy Markdown
Contributor Author

run buildall

@yiguolei
yiguolei merged commit cf9361b into apache:branch-4.2 Sep 22, 2026
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants