Skip to content

Commit

Permalink
[SQL][MINOR] remove newLongEncoder in functions
Browse files Browse the repository at this point in the history
it may shadows the one from implicits in some case.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #9629 from cloud-fan/minor.
  • Loading branch information
cloud-fan authored and marmbrus committed Nov 11, 2015
1 parent ec2b807 commit e71ba56
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e71ba56

Please sign in to comment.