eheewag commented on PR #44998: URL: https://github.com/apache/spark/pull/44998#issuecomment-1925585232
unsubscribe Thanks, Gabriel On Sun, Feb 4, 2024 at 12:52 PM YangJie ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala > <https://github.com/apache/spark/pull/44998#discussion_r1477177975>: > > > - (new LongHasher).asInstanceOf[Hasher[T]] > - } else if (mt == ClassTag.Int) { > - (new IntHasher).asInstanceOf[Hasher[T]] > - } else if (mt == ClassTag.Double) { > - (new DoubleHasher).asInstanceOf[Hasher[T]] > - } else if (mt == ClassTag.Float) { > - (new FloatHasher).asInstanceOf[Hasher[T]] > - } else { > - new Hasher[T] > - } > + protected val hasher: Hasher[T] = classTag[T] match { > + case ClassTag.Long => new LongHasher().asInstanceOf[Hasher[T]] > + case ClassTag.Int => new IntHasher().asInstanceOf[Hasher[T]] > + case ClassTag.Double => new DoubleHasher().asInstanceOf[Hasher[T]] > + case ClassTag.Float => new FloatHasher().asInstanceOf[Hasher[T]] > + case _ => new Hasher[T] > > cc @cloud-fan <https://github.com/cloud-fan> @dongjoon-hyun > <https://github.com/dongjoon-hyun> @srowen <https://github.com/srowen> > > All test passed. Can we make this change? > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/spark/pull/44998#pullrequestreview-1861268962>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABQLF6QRP7VHDKCXQLF7YYDYR4HZVAVCNFSM6AAAAABCWJH736VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNRRGI3DQOJWGI> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> > -- 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]
