spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgaido91 <...@git.apache.org>
Subject [GitHub] spark pull request #19878: [SPARK-22682][SQL] HashExpression does not need t...
Date Mon, 04 Dec 2017 15:51:21 GMT
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: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message