Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19878#discussion_r154687417
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala
---
@@ -389,13 +408,21 @@ abstract class HashExpression[E] extends Expression {
input: String,
result: String,
fields: Array[StructField]): String = {
- val hashes = fields.zipWithIndex.map { case (field, index) =>
+ val fieldsHash = fields.zipWithIndex.map { case (field, index) =>
nullSafeElementHash(input, index.toString, field.nullable,
field.dataType, result, ctx)
}
+ val hashResultType = ctx.javaType(dataType)
--- End diff --
nit: this is done also in line 281. Can we do this only once? maybe with a
`lazy val`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]