Skip to content

branch-4.2 [fe](cse) Extract aggregate-argument CSE below distribute - #68215

Open
englefly wants to merge 2 commits into
apache:branch-4.2from
englefly:pick-66815-4.2
Open

englefly wants to merge 2 commits into
apache:branch-4.2from
englefly:pick-66815-4.2

Conversation

@englefly

Copy link
Copy Markdown
Contributor

Cherry-pick of #66815 to branch-4.2

fe Extract aggregate-argument CSE below distribute

The upstream patch refactors the inline CSE logic into a projectAggregateCse helper
(a cosmetic refactor that branch-4.2 does not have) and adds the new
PhysicalDistribute branch; the pick keeps branch-4.2's inline structure and adds the
behavioural change only.

branch-4.2 has no bucketed hash aggregate, so the new suite's
set enable_bucketed_hash_agg=false line was replaced by a comment; the remaining
plan and result checks pass on this branch (VEXCHANGE + VSELECT with 4 references to
the extracted cast(a as BIGINT) + cast(b as BIGINT) slot).

Testing: nereids_rules_p0/agg_strategy/cse_agg_distribute passes on a branch-4.2 FE.

…pache#66815)

### What problem does this PR solve?
Extract aggregate-argument CSE below distribute
…_agg_distribute suite

branch-4.2 has no bucketed hash aggregate, so `enable_bucketed_hash_agg` does not
exist on this branch; the suite's plan/result checks pass without it.
@englefly
englefly requested a review from yiguolei as a code owner September 18, 2026 17:42
@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?

@englefly

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 85.71% (24/28) 🎉
Increment coverage report
Complete coverage report

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.

2 participants