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_r370988034
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala ########## @@ -282,6 +282,7 @@ abstract class HashExpression[E] extends Expression { } val hashResultType = CodeGenerator.javaType(dataType) + val typedSeed = if (dataType.sameType(LongType)) s"${seed}L" else s"$seed" Review comment: It doesn't change the result. For xxHash, the generated code just becomes `long varName = 123L` instead of `long varName = 123`. When the seed is <= 2^31, theres no difference between the two statements. When it is > 2^31, compilation of the generated code would fail without the `L`, so it is now possible to use any 64 bit seed. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org