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, cte: fix cte in the embeded union #38122
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. |
planner/core/integration_test.go
Outdated
@@ -7533,3 +7533,24 @@ func TestExplainAnalyzeDMLCommit(t *testing.T) { | |||
require.NoError(t, err) | |||
tk.MustQuery("select * from t").Check(testkit.Rows()) | |||
} | |||
|
|||
func TestOverrideCTEInUnion(t *testing.T) { |
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.
You can push the test to cmd/explain-test/t/cte
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.
Good! I moved this test to cmd/explaintest/t/cte 🍻 Thanks!
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.
PTAL
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@wjhuang2016 @CbcWestwolf Could you help me to merge this PR? |
I am not a committer yet. :-| |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 8b13f33
|
In response to a cherrypick label: cannot checkout |
In response to a cherrypick label: cannot checkout |
In response to a cherrypick label: cannot checkout |
In response to a cherrypick label: cannot checkout |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
Signed-off-by: YangKeao yangkeao@chunibyo.icu
What problem does this PR solve?
Issue Number: close #37928
Problem Summary:
The
With
in the second element of unionWITH xxx SELECT UNION (WITH xxx SELECT UNION SELECT)
is ignored. It can cause multiple problems like #37928, or the table is not found (as the cte disappeared)...What is changed and how it works?
Pass the
With
field in thebuildIntersect
function.Check List
Tests
Release note