Description
If the seed for xxHash is not an integer the generated code does not compile.
Steps to reproduce:
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()
Appending an L to the seed when the datatype is long fixes the issue.
Attachments
Issue Links
- links to