GitHub user dbtsai opened a pull request:

    https://github.com/apache/spark/pull/21848

    [SPARK-24890] [SQ] Short circuiting the `if` condition when `trueValue` and 
`falseValue` are the same

    ## What changes were proposed in this pull request?
    
    When `trueValue` and `falseValue` are semantic equivalence, the condition 
expression in `if` can be removed to avoid extra computation in runtime.
    
    ## How was this patch tested?
    
    Test added.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dbtsai/spark short-circuit-if

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21848.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21848
    
----
commit 30ca8cf8aad2b3c030902bd00c4e8b0dd9acc430
Author: DB Tsai <d_tsai@...>
Date:   2018-07-23T17:22:14Z

    Add if short circuit

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to