[ 
https://issues.apache.org/jira/browse/CALCITE-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534632#comment-17534632
 ] 

Chunwei Lei commented on CALCITE-3890:
--------------------------------------

{quote}Emp e LEFT JOIN Dept d USING (deptno)

becomes

(SELECT * FROM Emp WHERE deptno IS NOT NULL) LEFT JOIN Dept d USING (deptno)
{quote}
AFAIK, this transformation is wrong. For left/right join, the 
non-NULL-generating sides may have null values and they can not be filtered in 
advance.

> Derive IS NOT NULL filter for the inputs of inner join 
> -------------------------------------------------------
>
>                 Key: CALCITE-3890
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3890
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Chunwei Lei
>            Assignee: Chunwei Lei
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We can infer IS NOT NULL predicate from join which implies some columns may 
> not be null. For instance, 
>  
> {code:java}
> select * from a join b on a.id = b.id;
> {code}
> we can infer a.id is not null and b.id is not null.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to