-
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: mark the both side operand of NAAJ & refuse partial column substitute in projection elimination of Apply de-correlation #37117
Conversation
… in projection elimination Signed-off-by: AilinKid <314806019@qq.com>
[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. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/f6a6d091c9f362a60addc46c87071bb229a11cf9 |
/run-build |
@AilinKid Please fix linter. |
Signed-off-by: AilinKid <314806019@qq.com>
cherry pick to release-4.0 in PR #37346 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #37347 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.1 in PR #37348 |
cherry pick to release-5.2 in PR #37349 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.3 in PR #37350 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.4 in PR #37351 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.0 in PR #37352 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.1 in PR #37354 |
TiDB MergeCI notify
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.2 in PR #37357 |
Signed-off-by: AilinKid 314806019@qq.com
What problem does this PR solve?
Issue Number: close #37032
Problem Summary:
two problems mainly:
1: in the projection elimination of Apply decorrelate rule, we try to substitute any condition used in Apply with raw projected expression under this projection, after which this projection can be eliminated. But we should make sure
that all columns mapped from the schema of projection OP must be substituted atomically (all succeed or fail).
2: Consider an EQ condition converted from NOT IN OP (NAAJ), in which we used to mark the right side column of this "NA" EQ as InOperand=true. In some cases like columns substitution as we talked about above, cases like:
(a NA EQ b (marked InOperand=true ) ) where b will be substituted with like a constant string, so we got (a NA EQ "example" ), this condition will not be considered as a NA EQ condition anymore and will be moved from other condition to equal condition of join OP in the logical rule of pddResolver .
What is changed and how it works?
1: NAAJ is not just about one side, mark both as inOperand=true. so even the right has successfully been substituted with a constant string, we can also get (a (marked InOperand=true) NA EQ "example" ) as a NA EQ in the other condition.
2: make the column substitution atomically (all succeed or fail) in projection elimination of Apply decorrelation.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.