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

Incorrect assertion in scala test for aarch64 platform

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      We ran unit tests of spark on aarch64 server, here are two sql scala tests failed:

      • SPARK-26021: NaN and -0.0 in grouping expressions *** FAILED ***
        2143289344 equaled 2143289344 (DataFrameAggregateSuite.scala:732)
      • NaN and -0.0 in window partition keys *** FAILED ***
        2143289344 equaled 2143289344 (DataFrameWindowFunctionsSuite.scala:704)

      we found the values of floatToRawIntBits(0.0f / 0.0f) and floatToRawIntBits(Float.NaN) on aarch64 are same(2143289344), first we thought it's something about jdk or scala, but after discuss with jdk-dev and scala community see https://users.scala-lang.org/t/the-value-of-floattorawintbits-0-0f-0-0f-is-different-on-x86-64-and-aarch64-platforms/4845 , we believe the value depends on the architecture.

      Attachments

        Issue Links

          Activity

            People

              huangtianhua huangtianhua
              huangtianhua huangtianhua
              Sean R. Owen Sean R. Owen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: