-
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 column evaluator can not detect input's column-ref and thus swapping and destroying later column ref projection logic #53794
Conversation
Hi @AilinKid. 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-sigs/prow repository. |
pkg/expression/evaluator.go
Outdated
for inputIdx, outputIdxes := range inputIdxToOutputIdxes { | ||
find = false | ||
root = inputIdx | ||
for k, v := range selfRef { | ||
for _, one := range v { | ||
// if current inputIdx is in the value set of one selfRef. output the Root. | ||
if inputIdx == one { | ||
find = true | ||
root = k | ||
break | ||
} | ||
} | ||
if find { | ||
break | ||
} | ||
} | ||
// if we found, root should be redirected to real root of inputIdx (link the real root) | ||
// if we didn't, root should be the original inputIdx as it was. (inputIdx itself is a root) | ||
if _, ok := rootIdxToOutputIdxes[root]; ok { | ||
rootIdxToOutputIdxes[root] = append(rootIdxToOutputIdxes[root], outputIdxes...) | ||
} else { | ||
// if not find in any value set, it means input idx itself is a root. | ||
rootIdxToOutputIdxes[root] = append(rootIdxToOutputIdxes[root], outputIdxes...) | ||
} | ||
} |
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 think we're doing things like the disjoint set? There's already a implemented disjoint set in util
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.
Make sense
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53794 +/- ##
================================================
+ Coverage 72.8506% 74.8522% +2.0016%
================================================
Files 1562 1568 +6
Lines 439181 442974 +3793
================================================
+ Hits 319946 331576 +11630
+ Misses 99531 91060 -8471
- Partials 19704 20338 +634
Flags with carried forward coverage won't be shown. Click here to find out more.
|
PR needs rebase. 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. |
baedc3e
to
70d98ca
Compare
/retest-required |
@AilinKid: 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-sigs/prow repository. |
/retest-required |
@AilinKid: 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-sigs/prow repository. |
/ok-to-test |
39efd88
to
045545a
Compare
/retest-required |
/test fast_test_tiprow |
@AilinKid: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
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. |
release note provided by gpt: Release Note - Chinese Version修复: 修复了 column evaluator 无法识别输入 chunk 中的列引用的问题。该问题会导致在投影过程中,column evaluator 可能丢失原始输入列的内容,从而破坏后续引用投影逻辑。 Release Note - English VersionFix: Fixed an issue where the column evaluator could not detect column references in the input chunk. This bug caused the column evaluator to potentially lose the original input column data during projection, disrupting subsequent reference projection logic. |
0ef0440
to
d73466e
Compare
@AilinKid: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
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. |
Signed-off-by: AilinKid <[email protected]>
should be ok |
Signed-off-by: AilinKid <[email protected]>
/retest-required |
1 similar comment
/retest-required |
/test check-dev2 |
@AilinKid: The specified target(s) for
Use 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-sigs/prow repository. |
/retest-required |
2 similar comments
/retest-required |
/retest-required |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: winoros, XuHuaiyu 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 |
/retest |
Signed-off-by: AilinKid <[email protected]>
Signed-off-by: AilinKid <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #53713
Problem Summary:
What changed and how does it work?
Check List
Tests
use the valid SQL and error SQL inside issue to produce result
and compare it with MySQL output, both them output like below:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.