Github user buryat commented on a diff in the pull request:
https://github.com/apache/spark/pull/19266#discussion_r139489658
--- Diff:
core/src/main/java/org/apache/spark/unsafe/map/HashMapGrowthStrategy.java ---
@@ -30,11 +30,15 @@
HashMapGrowthStrategy DOUBLING = new Doubling();
class Doubling implements HashMapGrowthStrategy {
+
+ private static final int ARRAY_MAX = Integer.MAX_VALUE - 8;
--- End diff --
Maybe worth adding a comment why this values is chosen as the max
Like here
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/tip/src/share/classes/java/util/ArrayList.java#l223
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]