You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/09/18 15:05:20 UTC

[jira] [Resolved] (SPARK-17506) Improve the check double values equality rule

     [ https://issues.apache.org/jira/browse/SPARK-17506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved SPARK-17506.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1.0

Issue resolved by pull request 15059
[https://github.com/apache/spark/pull/15059]

> Improve the check double values equality rule
> ---------------------------------------------
>
>                 Key: SPARK-17506
>                 URL: https://issues.apache.org/jira/browse/SPARK-17506
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL, Tests
>            Reporter: Jiang Xingbo
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> In `ExpressionEvalHelper`, we check the equality between two double values by comparing whether the expected value is within the range [target - tolerance, target + tolerance], but this can cause a negative false when the compared numerics are very large. 
> For example:
> {code}
> val1 = 1.6358558070241E306
> val2 = 1.6358558070240974E306
> ExpressionEvalHelper.compareResults(val1, val2)
> false
> {code}
> In fact, val1 and val2 are but with different precisions, we should tolerant this case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org