-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: resolve select fields properly for coalesced columns of natural join (#25094) #30051
*: resolve select fields properly for coalesced columns of natural join (#25094) #30051
Conversation
Signed-off-by: ti-srebot <[email protected]>
[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. |
@ti-srebot: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
/run-all-tests |
@ti-srebot: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
@eurekaka you're already a collaborator in bot's repo. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 241380d
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/97710a6216667e306ce22115381cc53dbdf6f7bd |
/run-unit-test |
/run-unit-test |
/run-mysql-test |
/run-unit-test |
/run-mysql-test tidb-test=pr/1664 |
/run-mysql-test tidb-test=pr/1664 |
cherry-pick #25094 to release-5.2
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/30051
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Issue Number: close #25041
Problem Summary:
Incompatible error when grouping on join.
What is changed and how it works?
What's Changed:
Specially mark the redundant columns incurred by natural join /
using
keyword inFieldName
, and ignore them when resolving columns.How it Works:
The problem was incurred by #21922 when trying to fix #6712. #21922 exposes the columns in
redundantSchema
to the schema of aggregation, which led to the ambiguity.I have tried reverting the #21922 patch and finding the column in
LogicalJoin.redundantSchema
recursively when resolving the select fields, it can work in the plan building step, but would fail in the finalResolveIndices
, because aggregation is a schema producer.Related changes
N/A
Check List
Tests
Side effects
N/A
Release note