[
https://issues.apache.org/jira/browse/CALCITE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-6776:
------------------------------------
Labels: pull-request-available (was: )
> 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
>
> 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)