-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: make sure mpp join task's hashCols are all contained of its plan's schema #52836
Conversation
Signed-off-by: yibin <huyibin@pingcap.com>
Hi @yibin87. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions 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/test-infra repository. |
/cc @windtalker @winoros |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #52836 +/- ##
=================================================
- Coverage 72.3201% 55.9880% -16.3322%
=================================================
Files 1474 1589 +115
Lines 427611 602598 +174987
=================================================
+ Hits 309249 337383 +28134
- Misses 99057 242136 +143079
- Partials 19305 23079 +3774
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: yibin <huyibin@pingcap.com>
/test check-dev |
@yibin87: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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/test-infra repository. |
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.
So LGTM currently.
But you could add a TODO for our planner side.
The task.HashCols
should be stored in the p.schema
. i.e. Planner should maintain it instead of letting you re-add it here.
/hold |
Signed-off-by: yibin <huyibin@pingcap.com>
Signed-off-by: yibin <huyibin@pingcap.com>
/test pull-mysql-client-test |
@yibin87: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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/test-infra repository. |
/unhold |
/cc @SeaRise |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SeaRise, winoros The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test mysql-test |
/test pull-integration-ddl-test |
@yibin87: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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/test-infra repository. |
@yibin87: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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/test-infra repository. |
/test check-dev2 |
@yibin87: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions 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/test-infra repository. |
/hold |
/unhold |
/cherrypick release-8.1 |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@winoros: new pull request created to branch In response to this:
Instructions 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 ti-community-infra/tichi repository. |
/cherrypick release-7.5 |
/cherrypick release-7.1 |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@yibin87: new pull request created to branch In response to this:
Instructions 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 ti-community-infra/tichi repository. |
@yibin87: new pull request created to branch In response to this:
Instructions 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 ti-community-infra/tichi repository. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: close #52828
Problem Summary:
tidb/pkg/planner/core/task.go
Lines 523 to 546 in 3cfea6a
For example:
select A.id from A join B on A.id = B.id; Suppose B is probe side, and it's hash inner join.
After logical column pruning, the output schema of A join B will be A.id only; while the task's hashCols will be B.id. To make matters worse, the hashCols may be used to check if extra cast projection needs to be added, then the newly added projection will expect B.id as input schema. So this PR makes sure hashCols are included in task.p's schema.
empty projection(which schema is totally pruned) with projection child, will set child projection's schema to empty, which doesn't make sense. In such situation, keep child projection's schema seems more reasonable.
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.