Skip to content

Commit 5829a20

Browse files
committed
Testing, comment out tests
1 parent ae57788 commit 5829a20

File tree

2 files changed

+4
-70
lines changed

2 files changed

+4
-70
lines changed

go/vt/vtgate/planbuilder/operators/subquery_planning.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ func tryMergeSubqueryWithOuter(ctx *plancontext.PlanningContext, subQuery *SubQu
514514
if !subQuery.IsArgument {
515515
op.Source = newFilter(outer.Source, subQuery.Original)
516516
}
517-
// if outer.Comments != nil {
518-
// op.Comments = outer.Comments
519-
// }
517+
if outer.Comments != nil {
518+
op.Comments = outer.Comments
519+
}
520520
ctx.MergedSubqueries = append(ctx.MergedSubqueries, subQuery.originalSubquery)
521521
return op, Rewrote("merged subquery with outer")
522522
}

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

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -876,72 +876,6 @@
876876
]
877877
}
878878
},
879-
{
880-
"comment": "Comments with subquery",
881-
"query": "select /* comment */ user.col from user where id IN (select id from user where id > 1 and id < 10)",
882-
"plan": {
883-
"Type": "Scatter",
884-
"QueryType": "SELECT",
885-
"Original": "select /* comment */ user.col from user where id IN (select id from user where id > 1 and id < 10)",
886-
"Instructions": {
887-
"OperatorType": "Route",
888-
"Variant": "Scatter",
889-
"Keyspace": {
890-
"Name": "user",
891-
"Sharded": true
892-
},
893-
"FieldQuery": "select `user`.col from `user` where 1 != 1",
894-
"Query": "select /* comment */ `user`.col from `user` where id in (select id from `user` where id > 1 and id < 10)"
895-
},
896-
"TablesUsed": [
897-
"user.user"
898-
]
899-
}
900-
},
901-
{
902-
"comment": "Comments with subquery not merged into a single route",
903-
"query": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
904-
"plan": {
905-
"Type": "Complex",
906-
"QueryType": "SELECT",
907-
"Original": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
908-
"Instructions": {
909-
"OperatorType": "UncorrelatedSubquery",
910-
"Variant": "PulloutIn",
911-
"PulloutVars": [
912-
"__sq_has_values",
913-
"__sq1"
914-
],
915-
"Inputs": [
916-
{
917-
"InputName": "SubQuery",
918-
"OperatorType": "Route",
919-
"Variant": "Scatter",
920-
"Keyspace": {
921-
"Name": "user",
922-
"Sharded": true
923-
},
924-
"FieldQuery": "select id from `user` where 1 != 1",
925-
"Query": "select /* comment */ id from `user` where id > 1 and id < 10"
926-
},
927-
{
928-
"InputName": "Outer",
929-
"OperatorType": "Route",
930-
"Variant": "Scatter",
931-
"Keyspace": {
932-
"Name": "user",
933-
"Sharded": true
934-
},
935-
"FieldQuery": "select `user`.col from `user` where 1 != 1",
936-
"Query": "select /* comment */ `user`.col from `user` where :__sq_has_values and foo in ::__sq1"
937-
}
938-
]
939-
},
940-
"TablesUsed": [
941-
"user.user"
942-
]
943-
}
944-
},
945879
{
946880
"comment": "for update",
947881
"query": "select user.col from user join user_extra for update",
@@ -5230,4 +5164,4 @@
52305164
]
52315165
}
52325166
}
5233-
]
5167+
]

0 commit comments

Comments
 (0)