GitHub user cloud-fan opened a pull request:

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

    [SPARK-25746][SQL][followup] do not add unnecessary If expression

    ## What changes were proposed in this pull request?
    
    a followup of https://github.com/apache/spark/pull/22749.
    
    When we construct the new serializer in `ExpressionEncoder.tuple`, we don't 
need to add `if(isnull ...)` check for each field. They are either simple 
expressions that can propagate null correctly(e.g. 
`GetStructField(GetColumnByOrdinal(0, schema), index)`), or complex expression 
that already have the isnull check.
    
    ## How was this patch tested?
    
    existing tests

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

    $ git pull https://github.com/cloud-fan/spark minor

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

    https://github.com/apache/spark/pull/22898.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 #22898
    
----
commit 82664439318b72d8446230515abb882b89767bb9
Author: Wenchen Fan <wenchen@...>
Date:   2018-10-31T05:44:44Z

    do not add unnecessary If expression

----


---

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

Reply via email to