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 2022/12/02 19:45:00 UTC

[jira] [Commented] (SPARK-40099) Merge adjacent CaseWhen branches if their values are the same

    [ https://issues.apache.org/jira/browse/SPARK-40099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642673#comment-17642673 ] 

Apache Spark commented on SPARK-40099:
--------------------------------------

User 'MrDLontheway' has created a pull request for this issue:
https://github.com/apache/spark/pull/38893

> Merge adjacent CaseWhen branches if their values are the same
> -------------------------------------------------------------
>
>                 Key: SPARK-40099
>                 URL: https://issues.apache.org/jira/browse/SPARK-40099
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> For example:
> {code:sql}
>           CASE
>                     WHEN f1.buyer_id IS NOT NULL THEN 1
>                     WHEN f2.buyer_id IS NOT NULL THEN 1
>                     ELSE 0
>           END
> {code}
> The excepted result:
> {code:sql}
>           CASE
>                     WHEN f1.buyer_id IS NOT NULL or f2.buyer_id IS NOT NULL THEN 1
>                     ELSE 0
>           END
> {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