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

Mihai Budiu resolved CALCITE-6776.
----------------------------------
    Fix Version/s: 1.39.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/2f096ff2eccd98065227c812af09ea949fb719dd
Thank you for the contribution [~linorosa]
Thank you for the review [~asolimando]

> Multiple expanded `IS NOT DISTINCT FROM` cannot be collapsed back
> -----------------------------------------------------------------
>
>                 Key: CALCITE-6776
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6776
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Lino Rosa
>            Assignee: Lino Rosa
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> When a query has multiple `IS NOT DISTINCT FROM` operations, the resulting 
> query won't collapse them back and keeps them in expanded form. 
> For example:
> {code:java}
> left.A IS NOT DISTINCT FROM right.A AND 
> left.B IS NOT DISTINCT FROM right.B{code}
> will become:
> {code:java}
> (left.A IS NULL AND right.A IS NULL) OR (left.A = right.A)) AND
> (left.B IS NULL AND right.B IS NULL) OR (left.B = right.B)) {code}
>  
> This is particularly a problem with Spark, where the presence of the {{OR}} 
> will result in a {{BroadcastLoopJoin}} and derail the query execution.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to