-
Notifications
You must be signed in to change notification settings - Fork 6.1k
planner: add HasTiflash to avoid generating unnecessary mpp task | tidb-test=pr/2660 #65250
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
base: master
Are you sure you want to change the base?
planner: add HasTiflash to avoid generating unnecessary mpp task | tidb-test=pr/2660 #65250
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #65250 +/- ##
=================================================
- Coverage 77.7600% 47.5349% -30.2251%
=================================================
Files 2001 1780 -221
Lines 546165 464873 -81292
=================================================
- Hits 424698 220977 -203721
- Misses 119805 223075 +103270
- Partials 1662 20821 +19159
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
4728a02 to
e3b9c98
Compare
|
/retest |
|
/retest |
|
/retest |
1 similar comment
|
/retest |
b114bb3 to
e949bd4
Compare
|
/retest |
78144ef to
9b4552a
Compare
|
/retest |
| return nil, err | ||
| } | ||
| tableInfo := tbl.Meta() | ||
| sessionVars.StmtCtx.HasTiflash = sessionVars.StmtCtx.HasTiflash || b.ctx.GetSessionVars().IsMPPAllowed() && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to add this together in this pr.
Current physical optimization needs to generate the mpp task type first because we don't know whether its children can be converted to mpp plan.
If we want to do the pruning completely, we'll need to change the physical opt framework itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But under the current circumstances, most users actually won't have TiFlash replicas. So when building the data source, it can quickly determine whether it contains TiFlash based on the table metadata.
|
/retest |
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
2fc565f to
d1e96df
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@hawkingrei: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@hawkingrei: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #65335
Problem Summary:
What changed and how does it work?
checkCanPushDownToMPP will be called twice in the following code. The other problem is that if tables without tiflash replications are used in the query, we don't need to check the mpp task.
tidb/pkg/planner/core/operator/physicalop/physical_hash_agg.go
Lines 52 to 108 in 79ec3b6
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.