Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
We can infer IS NOT NULL predicate from join which implies some columns may not be null. For instance,
select * from a join b on a.id = b.id;
we can infer a.id is not null/b.id is not null and push down them into the child node of the join. Then it becomes
select * from (select* from a where id is null) t1 join (select * from b where id is not null) on t1.id = t2.id;
Attachments
Issue Links
- relates to
-
CALCITE-6363 Introduce a rule to derive more filters from inner join condition
- Open
-
HIVE-26427 Unify JoinDeriveIsNotNullFilterRule with HiveJoinAddNotNullRule
- Open
- links to
I agree. And we can also push down filters: ‘id is not null’ to both inputs, in this case.
Hopefully we can use existing logic, e.g. class Strong, for this deduction.