[HOTFIX] Fix compilation break.
This commit is contained in:
parent
d7982a3a9a
commit
67d753516d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -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)),
|
||||
|
|
Loading…
Reference in a new issue