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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org