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

Yu Xu resolved CALCITE-7915.
----------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
[https://github.com/apache/calcite/commit/779e37de8fa9a360eb4f0bd46f7206ead01dfced]

Thank you for the review [~mbudiu] 

> RelDecorrelator does not recognize IS NOT DISTINCT FROM as correlation 
> equivalent
> ---------------------------------------------------------------------------------
>
>                 Key: CALCITE-7915
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7915
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> RelDecorrelator#findCorrelationEquivalent only recognizes EQUALS (=) when 
> establishing correlation variable equivalences. This means conditions using 
> IS NOT DISTINCT FROM are ignored, potentially causing decorrelation to fail 
> or fall back to value generators unnecessarily.
>  
> eg:
> {code:java}
> SELECT *  FROM emp e  WHERE EXISTS (    SELECT * FROM dept d    WHERE 
> d.deptno IS NOT DISTINCT FROM e.deptno  )
> {code}
> Current behavior: The IS_NOT_DISTINCT_FROM condition is not recognized as 
> establishing an equivalence between $cor.deptno and d.deptno, so a value 
> generator may be created even when not strictly necessary.
>  
>  



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to