Skip to content
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

[release-18.0] Planner Bug: Joins inside derived table (#14974) #16962

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: update test expectations
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Oct 16, 2024
commit 9ec7b0a13d52fd9b58343428c3e0b20ba4b87c68
6 changes: 3 additions & 3 deletions go/vt/vtgate/executor_select_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ func TestCrossShardSubquery(t *testing.T) {
result, err := executorExec(ctx, executor, session, "select id1 from (select u1.id id1, u2.id from user u1 join user u2 on u2.id = u1.col where u1.id = 1) as t", nil)
require.NoError(t, err)
wantQueries := []*querypb.BoundQuery{{
Sql: "select id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where u1.id = 1) as t(`u1.col`)",
Sql: "select id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where u1.id = 1) as t",
BindVariables: map[string]*querypb.BindVariable{},
}}
utils.MustMatch(t, wantQueries, sbc1.Queries)
Expand Down Expand Up @@ -2891,7 +2891,7 @@ func TestCrossShardSubqueryStream(t *testing.T) {
result, err := executorStream(ctx, executor, "select id1 from (select u1.id id1, u2.id from user u1 join user u2 on u2.id = u1.col where u1.id = 1) as t")
require.NoError(t, err)
wantQueries := []*querypb.BoundQuery{{
Sql: "select id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where u1.id = 1) as t(`u1.col`)",
Sql: "select id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where u1.id = 1) as t",
BindVariables: map[string]*querypb.BindVariable{},
}}
utils.MustMatch(t, wantQueries, sbc1.Queries)
Expand Down Expand Up @@ -2934,7 +2934,7 @@ func TestCrossShardSubqueryGetFields(t *testing.T) {
result, err := executorExec(ctx, executor, session, "select main1.col, t.id1 from main1 join (select u1.id id1, u2.id from user u1 join user u2 on u2.id = u1.col where u1.id = 1) as t", nil)
require.NoError(t, err)
wantQueries := []*querypb.BoundQuery{{
Sql: "select t.id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where 1 != 1) as t(`u1.col`) where 1 != 1",
Sql: "select t.id1, t.`u1.col` from (select u1.id as id1, u1.col as `u1.col` from `user` as u1 where 1 != 1) as t where 1 != 1",
BindVariables: map[string]*querypb.BindVariable{},
}, {
Sql: "select 1 from (select u2.id as id from `user` as u2 where 1 != 1) as t where 1 != 1",
Expand Down
Loading