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: correctly handle expression.ScalarFunction in the buildSemiJoinForSetOperator #40390
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. |
/run-unit-test |
/test unit-test |
planner/core/logical_plans.go
Outdated
@@ -369,8 +369,8 @@ func (p *LogicalJoin) extractFDForOuterJoin(filtersFromApply []expression.Expres | |||
// means whether there is a `NullEQ` of a join key. | |||
func (p *LogicalJoin) GetJoinKeys() (leftKeys, rightKeys []*expression.Column, isNullEQ []bool, hasNullEQ bool) { | |||
for _, expr := range p.EqualConditions { | |||
leftKeys = append(leftKeys, expr.GetArgs()[0].(*expression.Column)) | |||
rightKeys = append(rightKeys, expr.GetArgs()[1].(*expression.Column)) | |||
leftKeys = append(leftKeys, expression.ExtractColumnsFromExpression(expr.GetArgs()[0], nil)...) |
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‘ll change thebuildSemiJoinForSetOperator
in buildExcept
, add another projection under it like what updateEQCond
does.
EQ((a-b),(c-d)), for join keys extracted here, means (a,b), (c,d), the join match means the exact equivalence for a=c, and b = d here, that's not right. actually, we need a project (a-b) as E,(c-d) as F, and the join keys here are simply as(E),(F), the join match means the exact equivalence for E = F here. @winoros
Even for EQ((a-b),c), for join keys extracted here, the left-keys length > right-keys length, that cause a problem later when execution.
/run-unit-test |
1 similar comment
/run-unit-test |
@AilinKid: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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. |
/merge |
@AilinKid: 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. |
/merge |
@hawkingrei: 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. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 45e648f
|
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: Weizhen Wang wangweizhen@pingcap.com
What problem does this PR solve?
Issue Number: close #40279
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.