morrySnow opened a new pull request, #67210:
URL: https://github.com/apache/doris/pull/67210
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
BucketedAggregationNode does not carry aggregate ORDER BY sort metadata. The
bucketed fusion eligibility traversal stopped at AggregateExpression nodes
whose functions otherwise support two-phase aggregation, so GROUP_CONCAT and
MULTI_DISTINCT_GROUP_CONCAT with ORDER BY could be fused incorrectly. Continue
traversing supported aggregate expressions so internal OrderExpression nodes
reject bucketed fusion.
### Release note
Fix incorrect planning of aggregate functions with internal ORDER BY when
bucketed hash aggregation is enabled.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
Test details:
- `./run-fe-ut.sh --run
org.apache.doris.nereids.glue.translator.BucketedAggregateTranslatorTest`:
passed (1 test).
- Regression case added to `bucketed_hash_agg.groovy`. Local execution was
blocked because no Doris cluster was listening on `127.0.0.1:9030`.
- Behavior changed:
- [ ] No.
- [x] Yes. Ordered aggregate functions now use the regular aggregation
path instead of bucketed aggregation.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]