GitHub user mgaido91 opened a pull request:

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

    [SPARK-24468][SQL] Handle negative scale when adjusting precision for 
decimal operations

    ## What changes were proposed in this pull request?
    
    In SPARK-22036 we introduced the possibility to allow precision loss in 
arithmetic operations (according to the SQL standard). The implementation was 
drawn from Hive's one, where Decimals with a negative scale are not allowed in 
the operations.
    
    The PR handles the case when the scale is negative, removing the assertion 
that it is not.
    
    ## How was this patch tested?
    
    added UTs


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

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

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

    https://github.com/apache/spark/pull/21499.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 #21499
    
----
commit 2f72ebbf6902ffb9fb6133e6e91c40abdc24079c
Author: Marco Gaido <marcogaido91@...>
Date:   2018-06-05T16:16:55Z

    [SPARK-24468][SQL] Handle negative scale when adjusting precision for 
decimal operations

----


---

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

Reply via email to