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 2020/08/28 02:15:00 UTC

[jira] [Commented] (SPARK-32721) Simplify if clauses with null and boolean

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

Apache Spark commented on SPARK-32721:
--------------------------------------

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

> Simplify if clauses with null and boolean
> -----------------------------------------
>
>                 Key: SPARK-32721
>                 URL: https://issues.apache.org/jira/browse/SPARK-32721
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Chao Sun
>            Priority: Major
>
> The following if clause:
> {code:sql}
> if(p, null, false) 
> {code}
> can be simplified to:
> {code:sql}
> and(p, null)
> {code}
> And similarly, the following clause:
> {code:sql}
> if(p, null, true)
> {code}
> can be simplified to:
> {code:sql}
> or(p, null)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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