Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/15741#discussion_r86261739
--- Diff:
core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---
@@ -42,10 +42,12 @@ import org.apache.spark.annotation.Private
*/
@Private
class OpenHashSet[@specialized(Long, Int) T: ClassTag](
- initialCapacity: Int,
+ var initialCapacity: Int,
--- End diff --
This looks really hacky and makes it a public variable. Why don't we just
change the require to >= 0, and then change nextPowerOf2 to pick a value that's
greater than 0?
---
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]