Skip to content

Commit

Permalink
[HOTFIX] Fix compilation break.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Apr 2, 2016
1 parent d7982a3 commit 67d7535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.io.{File, FileNotFoundException, IOException}
import java.net.URI
import java.util.ConcurrentModificationException

import scala.language.implicitConversions
import scala.util.Random

import org.apache.hadoop.conf.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
package org.apache.spark.sql.streaming

import org.apache.spark.SparkException
import org.apache.spark.sql.{Encoder, StreamTest, SumOf, TypedColumn}
import org.apache.spark.sql.StreamTest
import org.apache.spark.sql.execution.streaming._
import org.apache.spark.sql.expressions.scala.typed
import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.SharedSQLContext

Expand Down Expand Up @@ -118,11 +119,8 @@ class StreamingAggregationSuite extends StreamTest with SharedSQLContext {
}

test("typed aggregators") {
def sum[I, N : Numeric : Encoder](f: I => N): TypedColumn[I, N] =
new SumOf(f).toColumn

val inputData = MemoryStream[(String, Int)]
val aggregated = inputData.toDS().groupByKey(_._1).agg(sum(_._2))
val aggregated = inputData.toDS().groupByKey(_._1).agg(typed.sumLong(_._2))

testStream(aggregated)(
AddData(inputData, ("a", 10), ("a", 20), ("b", 1), ("b", 2), ("c", 1)),
Expand Down

0 comments on commit 67d7535

Please sign in to comment.