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 <wenc...@databricks.com>

Closes #9629 from cloud-fan/minor.

(cherry picked from commit e71ba56586ba64da18f412bc0e0263777c46ac4a)
Signed-off-by: Michael Armbrust <mich...@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 <wenc...@databricks.com>
Authored: Wed Nov 11 11:04:04 2015 -0800
Committer: Michael Armbrust <mich...@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-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to