uros-db commented on code in PR #46917:
URL: https://github.com/apache/spark/pull/46917#discussion_r1635039099
##########
core/src/main/scala/org/apache/spark/util/collection/OpenHashMap.scala:
##########
@@ -29,6 +29,16 @@ import scala.reflect.ClassTag
* NOTE: when using numeric type as the value type, the user of this class
should be careful to
* distinguish between the 0/0.0/0L and non-exist value
*/
+private[spark] class CollationAwareHashMap[K: ClassTag, V: ClassTag, X](
+ initialCapacity: Int,
+ hashering: AnyRef => Long,
+ equalsFunction: (AnyRef, AnyRef) => Boolean
+)
+ extends OpenHashMap[K, V](initialCapacity) {
+ override def getOpenHashSet: OpenHashSet[K] =
+ new CollationAwareOpenHashSet[K, X](initialCapacity, 0.7, hashering,
equalsFunction)
Review Comment:
what's 0.7 here? since I see it in multiple lines, we should consider
separating it out into one place, like a constant
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]