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

[jira] [Assigned] (SPARK-42223) Remove duplicate branches in CASE_WHEN and COALESCE function

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

Apache Spark reassigned SPARK-42223:
------------------------------------

    Assignee:     (was: Apache Spark)

> Remove duplicate branches in CASE_WHEN and COALESCE function
> ------------------------------------------------------------
>
>                 Key: SPARK-42223
>                 URL: https://issues.apache.org/jira/browse/SPARK-42223
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Wan Kun
>            Priority: Minor
>
> We can remove the duplicate branches in CASE_WHEN and COALESCE function.
> For example:
> {code:sql}
> SELECT
>   CASE WHEN id = 200 THEN 1
>        WHEN id = 200 THEN 2 -- same condition, can remove
>        WHEN id = 200 THEN 3 -- same condition, can remove
>        ELSE 0 END as c1,
>   coalesce(
>     id + 1,
>     id + 1, -- same expression, can remove
>     id) as c2
> FROM t1
> {code}



--
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