You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a query that can be merged into a single route, if one of the tables is a derived tables, and it is aliasing a column that is used in
a join predicate, Vitess produces the wrong query.
For the query:
select1from user
join (
select id as uid
from user) as t
wheret.uid=user.id
vtgate is now producing the following route:
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select 1 from (select id as uid from `user` where 1 != 1) as t, `user` where 1 != 1",
"Query": "select 1 from (select id as uid from `user` where id = :user_id) as t, `user` where t.uid = `user`.id",
"Table": "`user`"
}
This is the only operator in the plan - there is not join feeding the :user_id argument, so the query fails to run.
The text was updated successfully, but these errors were encountered:
For a query that can be merged into a single route, if one of the tables is a derived tables, and it is aliasing a column that is used in
a join predicate, Vitess produces the wrong query.
For the query:
vtgate is now producing the following route:
This is the only operator in the plan - there is not join feeding the
:user_id
argument, so the query fails to run.The text was updated successfully, but these errors were encountered: