[ 
https://issues.apache.org/jira/browse/CALCITE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-4074.
----------------------------------
    Resolution: Cannot Reproduce

I am marking 'cannot reproduce'. Please re-open if you have a test case on a 
recent version.

> Wrong plan for IS NULL in join query
> ------------------------------------
>
>                 Key: CALCITE-4074
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4074
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Zhixiong Chen
>            Priority: Major
>
> sql: 
> {code:java}
>  SELECT count(*) FROM T6
>  INNER JOIN T5 
>  ON T6.NUM = T5.NUM
>  OR ((T6.NUM IS NULL) AND (T5.NUM IS NULL));{code}
> However the plan is 
> {code:java}
> AggregateRel(group=[{0}], ctx=[])
>   ProjectRel(NUM1=[$2], ctx=[])
>     JoinRel(condition=[=($1, $5)], joinType=[inner], ctx=[])
>       TableScan(table=[[SAMPLE, T6]], ctx=[], fields=[[0, 1, 2, 3]])
>       TableScan(table=[[SAMPLE, T5]], ctx=[], fields=[[0, 1, 2, 3]])
> {code}
> It seem the filter IS NULL  is optimized , and the plan is wrong.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to