Skip to content

Commit

Permalink
[release-15.0] fix: cost to include subshard opcode (#14023) (#14025)
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
Co-authored-by: Harshit Gangal <[email protected]>
  • Loading branch information
vitess-bot[bot] and harshit-gangal authored Sep 20, 2023
1 parent d777c3a commit d2d8bf1
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions go/vt/vtgate/planbuilder/testdata/from_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -6365,5 +6365,90 @@
"zlookup_unique.t1"
]
}
},
{
"comment": "join query using table with muticolumn vindex",
"query": "select 1 from multicol_tbl m1 join multicol_tbl m2 on m1.cola = m2.cola",
"v3-plan": {
"QueryType": "SELECT",
"Original": "select 1 from multicol_tbl m1 join multicol_tbl m2 on m1.cola = m2.cola",
"Instructions": {
"OperatorType": "Join",
"Variant": "Join",
"JoinColumnIndexes": "L:0",
"JoinVars": {
"m1_cola": 1
},
"TableName": "multicol_tbl_multicol_tbl",
"Inputs": [
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select 1, m1.cola from multicol_tbl as m1 where 1 != 1",
"Query": "select 1, m1.cola from multicol_tbl as m1",
"Table": "multicol_tbl"
},
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select 1 from multicol_tbl as m2 where 1 != 1",
"Query": "select 1 from multicol_tbl as m2 where m2.cola = :m1_cola",
"Table": "multicol_tbl"
}
]
}
},
"gen4-plan": {
"QueryType": "SELECT",
"Original": "select 1 from multicol_tbl m1 join multicol_tbl m2 on m1.cola = m2.cola",
"Instructions": {
"OperatorType": "Join",
"Variant": "Join",
"JoinColumnIndexes": "L:1",
"JoinVars": {
"m1_cola": 0
},
"TableName": "multicol_tbl_multicol_tbl",
"Inputs": [
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select m1.cola, 1 from multicol_tbl as m1 where 1 != 1",
"Query": "select m1.cola, 1 from multicol_tbl as m1",
"Table": "multicol_tbl"
},
{
"OperatorType": "Route",
"Variant": "SubShard",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select 1 from multicol_tbl as m2 where 1 != 1",
"Query": "select 1 from multicol_tbl as m2 where m2.cola = :m1_cola",
"Table": "multicol_tbl",
"Values": [
":m1_cola"
],
"Vindex": "multicolIdx"
}
]
},
"TablesUsed": [
"user.multicol_tbl"
]
}
}
]

0 comments on commit d2d8bf1

Please sign in to comment.