patrickcording commented on a change in pull request #27354: [SPARK-30633][SQL]
Append L to seed when type is LongType
URL: https://github.com/apache/spark/pull/27354#discussion_r370988314
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HashExpressionsSuite.scala
##########
@@ -684,6 +684,21 @@ class HashExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
assert(murmur3HashPlan(wideRow).getInt(0) == murmursHashEval)
}
+ test("SPARK-30633: Use Long seeds for xxHash") {
+ val literal = Literal.create(42L, LongType)
+ val seeds = Seq(
+ Long.MinValue,
+ Integer.MIN_VALUE.toLong - 1L,
+ 0L,
+ Integer.MAX_VALUE.toLong + 1L,
+ Long.MaxValue
+ )
+
+ for (seed <- seeds) {
+ checkEvaluation(XxHash64(Seq(literal), seed), XxHash64(Seq(literal),
seed).eval())
Review comment:
I also don't understand this request. What should we be comparing?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]