Feature Description
For a query like select 1 from t1 where (false or (false or a in (1))), I noticed that Vitess simplifies the query into select 1 from t1 where false or a in (1).
The query, however, can be further simplified into select 1 from t1 where a in (1).
There are benefits of simplifying the query which can further lead to more simplifications and even merging queries together. Vitess in general works better with AND clauses and not so much with ORs, so the more we can eliminate the better.
Use Case(s)
The simplification of queries is better for better performance, or just in general too even if there is no performance impact.
Also, this is going to be used in a upcoming Foreign key PR :sung
Feature Description
For a query like
select 1 from t1 where (false or (false or a in (1))), I noticed that Vitess simplifies the query intoselect 1 from t1 where false or a in (1).The query, however, can be further simplified into
select 1 from t1 where a in (1).There are benefits of simplifying the query which can further lead to more simplifications and even merging queries together. Vitess in general works better with AND clauses and not so much with ORs, so the more we can eliminate the better.
Use Case(s)
The simplification of queries is better for better performance, or just in general too even if there is no performance impact.
Also, this is going to be used in a upcoming Foreign key PR :sung