Reputation: 1
Source SQL
SELECT e . *
FROM emp e
INNER JOIN dept d
ON e.deptno = d.deptno
AND emp.deptno = 5;
After Optimzie
select
e.
from
(
select
*
from
emp
where
emp.deptno = 5
) e
inner join (
select
*
from
deptno
where
deptno = 5
) on on e.deptno = d.deptno;
Does Calcite have this optimization rule?
Upvotes: 0
Views: 263
Reputation: 11
Yes, there was CoreRules.JOIN_CONDITION_PUSH
.
But the only emp.deptno = 5 can be pushed into table emp.
The transitive conditioin can be implement by your self.
Upvotes: 1