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 2018/08/20 20:03:00 UTC

[jira] [Resolved] (SPARK-24834) Utils#nanSafeCompare{Double,Float} functions do not differ from normal java double/float comparison

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

Sean Owen resolved SPARK-24834.
-------------------------------
    Resolution: Won't Fix

See PR – I think we can't do this directly as it changes semantics unfortunately.

> Utils#nanSafeCompare{Double,Float} functions do not differ from normal java double/float comparison
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-24834
>                 URL: https://issues.apache.org/jira/browse/SPARK-24834
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 2.3.2
>            Reporter: Benjamin Duffield
>            Priority: Minor
>
> Utils.scala contains two functions `nanSafeCompareDoubles` and `nanSafeCompareFloats` which purport to have special handling of NaN values in comparisons.
> The handling in these functions do not appear to differ from java.lang.Double.compare and java.lang.Float.compare - they seem to produce identical output to the built-in java comparison functions.
> I think it's clearer to not have these special Utils functions, and instead just use the standard java comparison functions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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