GitHub user davies opened a pull request:

    [SPARK-17494] [SQL] changePrecision() on compact decimal should respect 
rounding mode

    ## What changes were proposed in this pull request?
    Floor()/Ceil() of decimal is implemented using changePrecision() by passing 
a rounding mode, but the rounding mode is not respected when the decimal is in 
compact mode (could fit within a Long). 
    This Update the changePrecision() to respect rounding mode, which could be 
    ## How was this patch tested?
    Added regression tests.

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

    $ git pull decimal_round

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

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

    This closes #15154
commit cf0e445b600baad201062e77651bee3d907b42fd
Author: Davies Liu <>
Date:   2016-09-19T21:47:23Z

    changePrecision() on compact decimal should respect rounding mode


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to