New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
planner: fix bug that planner generates wrong 2 phase aggregate plan for TiFlash #34779
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/e605dea67573ee3a42bb3b32e05339e94d7f496b |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 3eec8a6939090c8db6f8110fe49b7bf7edc276ec
|
/run-all-tests |
…for TiFlash When pushing down aggregate past join operator, the planner updates the top aggregate from CompleteMode to FinalMode. But in MPP, the planner again tries to split the top aggregate into 2 stage aggregate: 1 partial aggregate on TiFlash, 1 Final aggregate on TiDB. The newly created partial aggregate will ignore the partial aggregate result that comes under the join and treats the data as standard input data, hence causes wrong result. In this patch, we disable splitting aggregate into multiple stages if the aggregate is in final mode. Close pingcap#34682
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e605dea
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.1 in PR #34932 |
TiDB MergeCI notify
|
cherry pick to release-5.4 in PR #35589 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
When pushing down aggregate past join operator, the planner updates the top aggregate from CompleteMode to FinalMode. But in MPP, the planner again tries to split the top aggregate into 2 stage aggregate: 1 partial aggregate on TiFlash, 1 Final aggregate on TiDB. The newly created partial aggregate will ignore the partial aggregate result that comes under the join and treats the data as standard input data, hence causes wrong result. In this patch, we disable splitting aggregate into multiple stages if the aggregate is in final mode.
What problem does this PR solve?
Issue Number: close #34682
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note