Github user buryat commented on a diff in the pull request:
https://github.com/apache/spark/pull/19266#discussion_r139615418
--- Diff:
core/src/main/scala/org/apache/spark/util/collection/PartitionedPairBuffer.scala
---
@@ -96,5 +96,5 @@ private[spark] class PartitionedPairBuffer[K,
V](initialCapacity: Int = 64)
}
private object PartitionedPairBuffer {
- val MAXIMUM_CAPACITY = Int.MaxValue / 2 // 2 ^ 30 - 1
+ val MAXIMUM_CAPACITY = (Int.MaxValue - 8) / 2
--- End diff --
maybe worth adding the `Int` type even though it's already an Int.
Also the comment at the line 28 should be changed to `1073741819` i.e. `-
8/2`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]