From 76768337beec6842660db7522ad15c25ee66d346 Mon Sep 17 00:00:00 2001 From: Wenchen Fan Date: Tue, 5 Jan 2016 10:23:36 -0800 Subject: [SPARK-12480][FOLLOW-UP] use a single column vararg for hash address comments in #10435 This makes the API easier to use if user programmatically generate the call to hash, and they will get analysis exception if the arguments of hash is empty. Author: Wenchen Fan Closes #10588 from cloud-fan/hash. --- sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/core') diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index e223e32fd7..1c96f647b6 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -1820,8 +1820,8 @@ object functions extends LegacyFunctions { * @since 2.0 */ @scala.annotation.varargs - def hash(col: Column, cols: Column*): Column = withExpr { - new Murmur3Hash((col +: cols).map(_.expr)) + def hash(cols: Column*): Column = withExpr { + new Murmur3Hash(cols.map(_.expr)) } ////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3