Github user viirya commented on the issue:
https://github.com/apache/spark/pull/20793
Does `hashSeed` method produce same hash value after this change?
```scala
scala> def hashSeed(seed: Long): Long = {
| val bytes =
ByteBuffer.allocate(java.lang.Long.SIZE).putLong(seed).array()
| val lowBits = MurmurHash3.bytesHash(bytes)
| val highBits = MurmurHash3.bytesHash(bytes, lowBits)
| (highBits.toLong << 32) | (lowBits.toLong & 0xFFFFFFFFL)
| }
hashSeed: (seed: Long)Long
scala> hashSeed(100)
res3: Long = 852394178374189935
scala> def hashSeed2(seed: Long): Long = {
| val bytes =
ByteBuffer.allocate(java.lang.Long.BYTES).putLong(seed).array()
| val lowBits = MurmurHash3.bytesHash(bytes)
| val highBits = MurmurHash3.bytesHash(bytes, lowBits)
| (highBits.toLong << 32) | (lowBits.toLong & 0xFFFFFFFFL)
| }
hashSeed2: (seed: Long)Long
scala> hashSeed2(100)
res7: Long = 1088402058313200430
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]