diff options
author | Wenchen Fan <wenchen@databricks.com> | 2015-11-11 11:04:04 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-11-11 11:04:04 -0800 |
commit | e71ba56586ba64da18f412bc0e0263777c46ac4a (patch) | |
tree | 51fb20f474443ae42beeca13b4c2177d61d18a1a /sql | |
parent | ec2b807212e568c9e98cd80746bcb61e02c7a98e (diff) | |
download | spark-e71ba56586ba64da18f412bc0e0263777c46ac4a.tar.gz spark-e71ba56586ba64da18f412bc0e0263777c46ac4a.tar.bz2 spark-e71ba56586ba64da18f412bc0e0263777c46ac4a.zip |
[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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 6 |
1 files changed, 2 insertions, 4 deletions
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 ab49ed4b5d..b6330e230a 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. |