You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mcmp.AssertMatches("select t1.id1 as t0, t1.id1 as t1, tbl.unq_col as col from t1 left outer join tbl on t1.id2 = tbl.nonunq_col order by t1.id2 limit 2", `[[INT64(1) INT64(1) INT64(42)] [INT64(42) INT64(42) NULL]]`)
372
373
mcmp.ExecWithColumnCompare("select t1.id1 as t0, t1.id1 as t1, tbl.unq_col as col from t1 left outer join tbl on t1.id2 = tbl.nonunq_col order by t1.id2 limit 2")
373
374
}
375
+
376
+
funcTestAlterTableWithView(t*testing.T) {
377
+
utils.SkipIfBinaryIsBelowVersion(t, 20, "vtgate")
378
+
mcmp, closer:=start(t)
379
+
defercloser()
380
+
381
+
// Test that create/alter view works and the output is as expected
Copy file name to clipboardExpand all lines: go/vt/vtgate/planbuilder/testdata/ddl_cases_no_default_keyspace.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@
125
125
"Name": "user",
126
126
"Sharded": true
127
127
},
128
-
"Query": "create view view_a as select user_id, col1, col2 from authoritative"
128
+
"Query": "create view view_a as select * from authoritative"
129
129
},
130
130
"TablesUsed": [
131
131
"user.view_a"
@@ -144,7 +144,7 @@
144
144
"Name": "user",
145
145
"Sharded": true
146
146
},
147
-
"Query": "create view view_a as select a.user_id, a.col1, a.col2, b.user_id, b.col1, b.col2 from authoritative as a join authoritative as b on a.user_id = b.user_id"
147
+
"Query": "create view view_a as select * from authoritative as a join authoritative as b on a.user_id = b.user_id"
148
148
},
149
149
"TablesUsed": [
150
150
"user.view_a"
@@ -163,7 +163,7 @@
163
163
"Name": "user",
164
164
"Sharded": true
165
165
},
166
-
"Query": "create view view_a as select user_id, col1, col2 from authoritative as a"
166
+
"Query": "create view view_a as select a.* from authoritative as a"
167
167
},
168
168
"TablesUsed": [
169
169
"user.view_a"
@@ -201,7 +201,7 @@
201
201
"Name": "user",
202
202
"Sharded": true
203
203
},
204
-
"Query": "create view view_a as select `user`.id, a.user_id, a.col1, a.col2, `user`.col1 from authoritative as a join `user` on a.user_id = `user`.id"
204
+
"Query": "create view view_a as select `user`.id, a.*, `user`.col1 from authoritative as a join `user` on a.user_id = `user`.id"
0 commit comments