spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marmb...@apache.org
Subject spark git commit: [SQL][MINOR] remove newLongEncoder in functions
Date Wed, 11 Nov 2015 19:04:40 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.6 9bf988555 -> 47cc1fe06


[SQL][MINOR] remove newLongEncoder in functions

it may shadows the one from implicits in some case.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #9629 from cloud-fan/minor.

(cherry picked from commit e71ba56586ba64da18f412bc0e0263777c46ac4a)
Signed-off-by: Michael Armbrust <michael@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/47cc1fe0
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/47cc1fe0
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/47cc1fe0

Branch: refs/heads/branch-1.6
Commit: 47cc1fe060e68d4fc8a734d2263b5daeb75d6ebe
Parents: 9bf9885
Author: Wenchen Fan <wenchen@databricks.com>
Authored: Wed Nov 11 11:04:04 2015 -0800
Committer: Michael Armbrust <michael@databricks.com>
Committed: Wed Nov 11 11:04:25 2015 -0800

----------------------------------------------------------------------
 sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/47cc1fe0/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
----------------------------------------------------------------------
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 ab49ed4..b6330e2 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
@@ -83,9 +83,6 @@ object functions extends LegacyFunctions {
     Column(func.toAggregateExpression(isDistinct))
   }
 
-  private implicit def newLongEncoder: Encoder[Long] = ExpressionEncoder[Long](flat = true)
-
-
   /**
    * Returns a [[Column]] based on the given column name.
    *
@@ -269,7 +266,8 @@ object functions extends LegacyFunctions {
    * @group agg_funcs
    * @since 1.3.0
    */
-  def count(columnName: String): TypedColumn[Any, Long] = count(Column(columnName)).as[Long]
+  def count(columnName: String): TypedColumn[Any, Long] =
+    count(Column(columnName)).as(ExpressionEncoder[Long](flat = true))
 
   /**
    * Aggregate function: returns the number of distinct items in a group.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message