HyukjinKwon commented on a change in pull request #29280:
URL: https://github.com/apache/spark/pull/29280#discussion_r462028304
##########
File path:
core/src/test/scala/org/apache/spark/util/collection/unsafe/sort/RadixSortSuite.scala
##########
@@ -157,7 +157,7 @@ class RadixSortSuite extends SparkFunSuite with Logging {
buffer, N, sortType.startByteIdx, sortType.endByteIdx,
sortType.descending, sortType.signed)
val result = collectToArray(buffer, outOffset, N)
- assert(ref.view == result.view)
+ assert(ref.sameElements(result))
Review comment:
Ah, I faced this problem before in spark-xml. I believe you can use
`===` instead, see also https://www.scalactic.org/user_guide/DefaultEquality. I
remember it reports better when the arrays are not equal. e.g.)
```
scala.Predef.intArrayOps(data0).sameElements[Int](scala.Predef.wrapIntArray(scala.Array.apply(1,
2, 3))) was false
```
vs
```
Expected :Array(1, 2, 3)
Actual :Array(-2147417843, -2147393996, -2146420562, -2146408050,
-2145758434, ...
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]