GitHub user ueshin opened a pull request:

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

    [SPARK-25208][SQL][FOLLOW-UP] Reduce code size.

    ## What changes were proposed in this pull request?
    
    When casting to decimal type, if `Cast.canNullSafeCastToDecimal()`, 
overflow won't happen, so we don't need to check the result of 
`Decimal.changePrecision()`.
    
    ## How was this patch tested?
    
    Existing tests.


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

    $ git pull https://github.com/ueshin/apache-spark 
issues/SPARK-25208/reduce_code_size

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

    https://github.com/apache/spark/pull/22352.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 #22352
    
----
commit ee471261b5c2c963f386728b47f045e2f729d5f2
Author: Takuya UESHIN <ueshin@...>
Date:   2018-09-06T11:28:17Z

    Reduce code size.

----


---

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

Reply via email to