Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
  • Loading branch information
harshit-gangal committed Apr 24, 2024
1 parent d325cc1 commit 1c4d590
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions go/vt/vtgate/planbuilder/testdata/onecase.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,68 @@
[
{
"comment": "Add your test case here for debugging and run go test -run=One.",
"query": "",
"comment": "delete from reference table - query send to source table",
"query": "delete from user.ref_with_source where col = 1",
"plan": {

"QueryType": "DELETE",
"Original": "delete from user.ref_with_source where col = 1",
"Instructions": {
"OperatorType": "Delete",
"Variant": "Unsharded",
"Keyspace": {
"Name": "main",
"Sharded": false
},
"TargetTabletType": "PRIMARY",
"Query": "delete from source_of_ref where col = 1",
"Table": "source_of_ref"
},
"TablesUsed": [
"main.source_of_ref"
]
}
},
{
"comment": "update from reference table - query send to source table",
"query": "update user.ref_with_source set x = 4 where col = 1",
"plan": {
"QueryType": "UPDATE",
"Original": "update user.ref_with_source set x = 4 where col = 1",
"Instructions": {
"OperatorType": "Update",
"Variant": "Unsharded",
"Keyspace": {
"Name": "main",
"Sharded": false
},
"TargetTabletType": "PRIMARY",
"Query": "update source_of_ref set x = 4 where col = 1",
"Table": "source_of_ref"
},
"TablesUsed": [
"main.source_of_ref"
]
}
},
{
"comment": "insert from reference table - query send to source table",
"query": "insert into user.ref_with_source(x) values(4)",
"plan": {
"QueryType": "INSERT",
"Original": "insert into user.ref_with_source(x) values(4)",
"Instructions": {
"OperatorType": "Insert",
"Variant": "Unsharded",
"Keyspace": {
"Name": "main",
"Sharded": false
},
"TargetTabletType": "PRIMARY",
"Query": "insert into source_of_ref(x) values (4)",
"TableName": "source_of_ref"
},
"TablesUsed": [
"main.source_of_ref"
]
}
}
]

0 comments on commit 1c4d590

Please sign in to comment.