Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Consider the following query that uses a materialized derived table
select * from |
(select c, count(d) from t1 where b=f(a) and c=g(b) group by a) as t |
where t.b < 2 and t.c > 3 |
Currently neither b<2 nor c>3 can be pushed into the WHERE clause of derived table t as these conditions does not depend on grouping column a directly or indirectly through equalities.
Using functional dependencies we could state that these conditions actually can be pushed into the WHERE clause of the derived table.
Similarly functional dependencies could be used to push conditions into WHERE clauses of materialized subqueries as well as for pushing conditions from HAVING into WHERE.
Attachments
Issue Links
- is part of
-
MDEV-11588 Support for ONLY_FULL_GROUP_BY functional dependency
- Stalled