Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-24834

Utils#nanSafeCompare{Double,Float} functions do not differ from normal java double/float comparison

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.3.2
    • None
    • Spark Core
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bduffield Benjamin Duffield
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: