Skip to content

Commit

Permalink
updated dml plan test for IN clause
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Apr 26, 2020
1 parent 2c38ce2 commit 3021505
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions go/vt/vtgate/planbuilder/testdata/dml_cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1558,15 +1558,22 @@
"Original": "update user_extra set val = 1 where user_id in (1, 2)",
"Instructions": {
"OperatorType": "Update",
"Variant": "Scatter",
"Variant": "In",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"TargetTabletType": "MASTER",
"MultiShardAutocommit": false,
"Query": "update user_extra set val = 1 where user_id in (1, 2)",
"Table": "user_extra"
"Table": "user_extra",
"Values": [
[
1,
2
]
],
"Vindex": "user_index"
}
}

Expand Down Expand Up @@ -1749,15 +1756,22 @@
"Original": "delete from user_extra where user_id in (1, 2)",
"Instructions": {
"OperatorType": "Delete",
"Variant": "Scatter",
"Variant": "In",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"TargetTabletType": "MASTER",
"MultiShardAutocommit": false,
"Query": "delete from user_extra where user_id in (1, 2)",
"Table": "user_extra"
"Table": "user_extra",
"Values": [
[
1,
2
]
],
"Vindex": "user_index"
}
}

Expand Down Expand Up @@ -1851,7 +1865,7 @@
"Original": "update user set name = null where id in (1, 2, 3)",
"Instructions": {
"OperatorType": "Update",
"Variant": "Scatter",
"Variant": "In",
"Keyspace": {
"Name": "user",
"Sharded": true
Expand All @@ -1864,7 +1878,15 @@
"MultiShardAutocommit": false,
"OwnedVindexQuery": "select Id, Name, Costly from user where id in (1, 2, 3) for update",
"Query": "update user set name = null where id in (1, 2, 3)",
"Table": "user"
"Table": "user",
"Values": [
[
1,
2,
3
]
],
"Vindex": "user_index"
}
}

Expand Down Expand Up @@ -1923,7 +1945,7 @@
"Original": "delete from user where id in (1, 2, 3)",
"Instructions": {
"OperatorType": "Delete",
"Variant": "Scatter",
"Variant": "In",
"Keyspace": {
"Name": "user",
"Sharded": true
Expand All @@ -1933,7 +1955,15 @@
"MultiShardAutocommit": false,
"OwnedVindexQuery": "select Id, Name, Costly from user where id in (1, 2, 3) for update",
"Query": "delete from user where id in (1, 2, 3)",
"Table": "user"
"Table": "user",
"Values": [
[
1,
2,
3
]
],
"Vindex": "user_index"
}
}

Expand Down

0 comments on commit 3021505

Please sign in to comment.