-
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
planner: fix cte-schema-clone will clone the old hashcode of its column if any (#35415) #35495
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/ac64367637e241ea659e17eaea63538269955f67 |
/merge |
@chrysan: 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. |
/run-mysql-test |
1 similar comment
/run-mysql-test |
/run-mysql-test |
/run-mysql-test tidb-test=release-6.1 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: ac64367
|
cherry-pick #35415 to release-6.1-20220619
Thank you for contributing to TiDB!
PR Title Format:
-->
What problem does this PR solve?
Issue Number: close #35404
Problem Summary:
After #33158, the predicate pushdown for CTE has been supported. While some cases will have some problems when it comes to projection elimination using column's hashcode mapping.
In building dataSource, we clone CTE schema with some newly assigned uniqueID when referring to a CTE. In PR #33158, code as following
here will generate hashcode in columns of the schema of CTE when building CTE itself.
Later when building the main select clause, CTE reference will clone CTE's schema and assign new uniqueIDs, here should clean these hashcodes because they are not valid anymore.(new uniqueID)
What is changed and how it works?
Just a quick test for verity resolveIndices error when select statement with join of CTE reference
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.