Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/15907#discussion_r88604890
--- Diff:
core/src/test/scala/org/apache/spark/util/collection/unsafe/sort/RadixSortSuite.scala
---
@@ -73,22 +73,22 @@ class RadixSortSuite extends SparkFunSuite with Logging
{
},
2, 4, false, false, true))
- private def generateTestData(size: Int, rand: => Long): (Array[JLong],
LongArray) = {
- val ref = Array.tabulate[Long](size) { i => rand }
- val extended = ref ++ Array.fill[Long](size)(0)
+ private def generateTestData(size: Long, rand: => Long): (Array[JLong],
LongArray) = {
+ val ref = Array.tabulate[Long](size.toInt) { i => rand }
+ val extended = ref ++ Array.fill[Long](size.toInt)(0)
(ref.map(i => new JLong(i)), new
LongArray(MemoryBlock.fromLongArray(extended)))
}
- private def generateKeyPrefixTestData(size: Int, rand: => Long):
(LongArray, LongArray) = {
- val ref = Array.tabulate[Long](size * 2) { i => rand }
- val extended = ref ++ Array.fill[Long](size * 2)(0)
+ private def generateKeyPrefixTestData(size: Long, rand: => Long):
(LongArray, LongArray) = {
+ val ref = Array.tabulate[Long]((size * 2).toInt) { i => rand }
+ val extended = ref ++ Array.fill[Long]((size * 2).toInt)(0)
(new LongArray(MemoryBlock.fromLongArray(ref)),
new LongArray(MemoryBlock.fromLongArray(extended)))
}
- private def collectToArray(array: LongArray, offset: Int, length: Int):
Array[Long] = {
+ private def collectToArray(array: LongArray, offset: Int, length: Long):
Array[Long] = {
var i = 0
- val out = new Array[Long](length)
+ val out = new Array[Long](length.toInt)
--- End diff --
Sorry, I put this comment before pushed. Now, you can see
[it](https://github.com/apache/spark/pull/15907/commits/3f9efdb036edb72993a6ee64f326ccab3da695ac#diff-c5436dae59341d3506e442c3eb7e07e7L91)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]