GitHub user mgaido91 opened a pull request:

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

    [SPARK-26233][SQL] CheckOverflow when encoding a decimal value

    ## What changes were proposed in this pull request?
    
    When we encode a Decimal from external source we don't check for overflow. 
That method is useful not only in order to enforce that we can represent the 
correct value in the specified range, but it also changes the underlying data 
to the right precision/scale. Since in our code generation we assume that a 
decimal has exactly the same precision and scale of its data type, missing to 
enforce it can lead to corrupted output/results when there are subsequent 
transformations.
    
    ## How was this patch tested?
    
    added UT


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

    $ git pull https://github.com/mgaido91/spark SPARK-26233

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

    https://github.com/apache/spark/pull/23210.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 #23210
    
----
commit 91d3e1b49667d3d5023663c8507570a118c54254
Author: Marco Gaido <marcogaido91@...>
Date:   2018-12-03T16:16:08Z

    [SPARK-26233][SQL] CheckOverflow when encoding a decimal value

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to