You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2016/03/02 05:30:18 UTC
[jira] [Created] (SPARK-13611) import Aggregator doesn't work in
Spark Shell
Wenchen Fan created SPARK-13611:
-----------------------------------
Summary: import Aggregator doesn't work in Spark Shell
Key: SPARK-13611
URL: https://issues.apache.org/jira/browse/SPARK-13611
Project: Spark
Issue Type: Bug
Components: SQL
Reporter: Wenchen Fan
{code}
scala> import org.apache.spark.sql.expressions.Aggregator
import org.apache.spark.sql.expressions.Aggregator
scala> class SumOf[I, N : Numeric](f: I => N) extends Aggregator[I, N, N] with Serializable {
| val numeric = implicitly[Numeric[N]]
| override def zero: N = numeric.zero
| override def reduce(b: N, a: I): N = numeric.plus(b, f(a))
| override def merge(b1: N,b2: N): N = numeric.plus(b1, b2)
| override def finish(reduction: N): N = reduction
| }
<console>:10: error: not found: type Aggregator
class SumOf[I, N : Numeric](f: I => N) extends Aggregator[I, N, N] with Serializable {
^
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org