You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2023/05/25 08:44:00 UTC

[jira] [Resolved] (SPARK-43596) Subquery decorrelation rewriteDomainJoins failure from ConstantFolding to isnull

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

Wenchen Fan resolved SPARK-43596.
---------------------------------
    Fix Version/s: 3.5.0
       Resolution: Fixed

Issue resolved by pull request 41265
[https://github.com/apache/spark/pull/41265]

> Subquery decorrelation rewriteDomainJoins failure from ConstantFolding to isnull
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-43596
>                 URL: https://issues.apache.org/jira/browse/SPARK-43596
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Jack Chen
>            Priority: Major
>             Fix For: 3.5.0
>
>
> We can get a decorrelation error because of rewrites that run in between DecorrelateInnerQuery and rewriteDomainJoins, that modify the correlation join conditions. In particular, ConstantFolding can transform `innercol <=> null` to `isnull(innercol)` and then rewriteDomainJoins does not recognize this and throws error Unable to rewrite domain join with conditions: ArrayBuffer(isnull(innercol#280)) because the isnull is not an equality, so it isn't usable for rewriting the domain join.
> Can fix by recognizing `isnull(innercol)` as `innercol <=> null` in rewriteDomainJoins.
> This area is also fragile in general and other rewrites that run between the two steps of decorrelation could potentially break their assumptions, so we may want to investigate longer-term follow ups for that.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org