GitHub user mgaido91 opened a pull request:

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

    [SPARK-24123][SQL] Fix precision issues in monthsBetween with more than 8 
digits

    ## What changes were proposed in this pull request?
    
    SPARK-23902 introduced the ability to retrieve more than 8 digits in 
`monthsBetween`. Unfortunately, current implementation can cause precision loss 
in such a case. This was causing also a flaky UT.
    
    This PR mirrors Hive's implementation in order to avoid precision loss also 
when more than 8 digits are returned.
    
    
    ## How was this patch tested?
    
    running 10000000 times the flaky UT


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

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

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

    https://github.com/apache/spark/pull/21196.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 #21196
    
----
commit c398b0455e53355933dc96198bc9f643c3e0c105
Author: Marco Gaido <marcogaido91@...>
Date:   2018-04-30T19:06:18Z

    [SPARK-24123][SQL] Fix precision issues in monthsBetween with more than 8 
digits

----


---

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

Reply via email to