Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A58BF200D50 for ; Mon, 4 Dec 2017 17:05:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A3F7A160BF9; Mon, 4 Dec 2017 16:05:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1C5E160BF3 for ; Mon, 4 Dec 2017 17:05:31 +0100 (CET) Received: (qmail 73194 invoked by uid 500); 4 Dec 2017 16:05:31 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 73183 invoked by uid 99); 4 Dec 2017 16:05:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2017 16:05:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 97027E2F03; Mon, 4 Dec 2017 16:05:30 +0000 (UTC) From: cloud-fan To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request #19878: [SPARK-22682][SQL] HashExpression does not need t... Content-Type: text/plain Message-Id: <20171204160530.97027E2F03@git1-us-west.apache.org> Date: Mon, 4 Dec 2017 16:05:30 +0000 (UTC) archived-at: Mon, 04 Dec 2017 16:05:32 -0000 Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/19878#discussion_r154691937 --- 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 -- `ctx` is only available inside `doGenCode` --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org