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

Wenchen Fan resolved SPARK-39106.
---------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

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

> Correct conditional expression constant folding
> -----------------------------------------------
>
>                 Key: SPARK-39106
>                 URL: https://issues.apache.org/jira/browse/SPARK-39106
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: XiDuo You
>            Priority: Major
>             Fix For: 3.3.0
>
>
> For a conditional expression, we can not partially fold the constant inside 
> it's children. For example if c1 or c2 is not null, the last branch should be 
> never hit.
> {code:java}
> SELECT COALESCE(c1, c2, 1/0);
> {code}
> Besides, for CaseWhen and If, we should mark it as foldable if it's children 
> are foldable. It is safe since the both non-codegen and codegen code path 
> have already respected the evaluation order.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to