huangtianhua commented on a change in pull request #25186: 
[SPARK-28433][SQL]Special scala test case for aarch64
URL: https://github.com/apache/spark/pull/25186#discussion_r305215015
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala
 ##########
 @@ -728,9 +728,15 @@ class DataFrameAggregateSuite extends QueryTest with 
SharedSQLContext {
     import java.lang.Float.floatToRawIntBits
     import java.lang.Double.doubleToRawLongBits
 
-    // 0.0/0.0 and NaN are different values.
-    assert(floatToRawIntBits(0.0f/0.0f) != floatToRawIntBits(Float.NaN))
-    assert(doubleToRawLongBits(0.0/0.0) != doubleToRawLongBits(Double.NaN))
+    if (System.getProperty("os.arch").contains("aarch64")) {
 
 Review comment:
   No, we ran the tests without modification of spark code on arm64, and the 
test failed, and also I took the tests on arm64, see:
   # on x86_64
   root@donotdel-openlab-allinone-l00242678:/home/ubuntu# uname -a
   Linux donotdel-openlab-allinone-l00242678 4.4.0-154-generic #181-Ubuntu SMP 
Tue Jun 25 05:29:03 UTC
   2019 x86_64 x86_64 x86_64 GNU/Linux
   
   scala> import java.lang.Float.floatToRawIntBits
   import java.lang.Float.floatToRawIntBits
   scala> floatToRawIntBits(0.0f/0.0f)
   res0: Int = -4194304
   scala> floatToRawIntBits(Float.NaN)
   res1: Int = 2143289344
   
   #on aarch64
   [root@arm-huangtianhua spark]# uname -a
   Linux arm-huangtianhua 4.14.0-49.el7a.aarch64 #1 SMP Tue Apr 10 17:22:26 UTC 
2018 aarch64 aarch64 aarch64 GNU/Linux
   
   scala> import java.lang.Float.floatToRawIntBits
   import java.lang.Float.floatToRawIntBits
   scala> floatToRawIntBits(0.0f/0.0f)
   res1: Int = 2143289344
   scala> floatToRawIntBits(Float.NaN)
   res2: Int = 2143289344 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to