Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
Consider:
SELECT *
FROM emp JOIN dept ON emp.deptno = dept.deptno
WHERE emp.deptno = 10
Clearly we can push down "emp.deptno = 10" through the join. But we can also generate a constraint "dept.deptno = 10" on the other input to the join. This task is to add a rule to achieve that.
The rule would propagate the constraints on column "a" onto column "b" when "a" and "b" are compared using "=" or other relational operator (e.g. ">") in a filter or join condition.
The planner state should reflect the fact that such constraints are optional – i.e. the query produces the same result if the constraints are omitted – and therefore the constraints can be omitted if they turn out to be expensive to implement.
---------------- Imported from GitHub ----------------
Url: https://github.com/julianhyde/optiq/issues/41
Created by: julianhyde
Labels:
Created at: Fri May 17 01:13:26 CEST 2013
State: open
Attachments
Issue Links
- duplicates
-
CALCITE-360 Introduce a Rule to infer predicates from equi join conditions.
- Closed