Skip to content

Commit 729549c

Browse files
committed
Update test query in select_cases.json
Signed-off-by: David Piegza <[email protected]>
1 parent b527cf4 commit 729549c

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

go/vt/vtgate/planbuilder/testdata/select_cases.json

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -965,21 +965,43 @@
965965
"skip_e2e": true
966966
},
967967
{
968-
"comment": "Comment with subquery not merged into a single route",
968+
"comment": "Comments with subquery not merged into a single route",
969969
"query": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
970970
"plan": {
971-
"Type": "Scatter",
971+
"Type": "Complex",
972972
"QueryType": "SELECT",
973973
"Original": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
974974
"Instructions": {
975-
"OperatorType": "Route",
976-
"Variant": "Scatter",
977-
"Keyspace": {
978-
"Name": "user",
979-
"Sharded": true
980-
},
981-
"FieldQuery": "select `user`.col from `user` where 1 != 1",
982-
"Query": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)"
975+
"OperatorType": "UncorrelatedSubquery",
976+
"Variant": "PulloutIn",
977+
"PulloutVars": [
978+
"__sq_has_values",
979+
"__sq1"
980+
],
981+
"Inputs": [
982+
{
983+
"InputName": "SubQuery",
984+
"OperatorType": "Route",
985+
"Variant": "Scatter",
986+
"Keyspace": {
987+
"Name": "user",
988+
"Sharded": true
989+
},
990+
"FieldQuery": "select id from `user` where 1 != 1",
991+
"Query": "select /* comment */ id from `user` where id > 1 and id < 10"
992+
},
993+
{
994+
"InputName": "Outer",
995+
"OperatorType": "Route",
996+
"Variant": "Scatter",
997+
"Keyspace": {
998+
"Name": "user",
999+
"Sharded": true
1000+
},
1001+
"FieldQuery": "select `user`.col from `user` where 1 != 1",
1002+
"Query": "select /* comment */ `user`.col from `user` where :__sq_has_values and foo in ::__sq1"
1003+
}
1004+
]
9831005
},
9841006
"TablesUsed": [
9851007
"user.user"

0 commit comments

Comments
 (0)