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

Zoltan Haindrich commented on CALCITE-3890:
-------------------------------------------

[~Chunwei Lei]: in Hive we have a rule which somewhat does this
I was sure that a Calcite rule adds all the {{is not null}} conditions (and it 
is)...but apparently it was not contributed back; and it's still only available 
inside Hive.
it might worth taking a look at it: 
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java

> Infer IS NOT NULL predicate from 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
>
> 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.3.4#803005)

Reply via email to