[ https://issues.apache.org/jira/browse/SPARK-30633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun reassigned SPARK-30633: ------------------------------------- Assignee: Patrick Cording > Codegen fails when xxHash seed is not an integer > ------------------------------------------------ > > Key: SPARK-30633 > URL: https://issues.apache.org/jira/browse/SPARK-30633 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.4.4 > Reporter: Patrick Cording > Assignee: Patrick Cording > Priority: Major > Fix For: 2.4.5, 3.0.0 > > > If the seed for xxHash is not an integer the generated code does not compile. > Steps to reproduce: > {code:java} > import org.apache.spark.sql.catalyst.expressions.XxHash64 > import org.apache.spark.sql.Column > val file = "..." > val column = col("...") > val df = spark.read.csv(file) > def xxHash(seed: Long, cols: Column*): Column = new Column( > XxHash64(cols.map(_.expr), seed) > ) > val seed = (Math.pow(2, 32)+1).toLong > df.select(xxHash(seed, column)).show() > {code} > Appending an L to the seed when the datatype is long fixes the issue. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org