spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdas <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-15517][SQL][STREAMING] Add support for ...
Date Tue, 24 May 2016 23:18:49 GMT
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13286#discussion_r64492042
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingAggregationSuite.scala
---
    @@ -67,6 +64,43 @@ class StreamingAggregationSuite extends StreamTest with SharedSQLContext
with Be
         )
       }
     
    +  test("simple count, complete mode") {
    +    val inputData = MemoryStream[Int]
    +
    +    val aggregated =
    +      inputData.toDF()
    +        .groupBy($"value")
    +        .agg(count("*"))
    +        .as[(Int, Long)]
    +
    +    testStream(aggregated, OutputMode.Complete)(
    +      AddData(inputData, 3),
    +      CheckLastBatch((3, 1)),
    +      AddData(inputData, 2),
    +      CheckLastBatch((3, 1), (2, 1)),
    +      StopStream,
    +      StartStream(),
    +      AddData(inputData, 3, 2, 1),
    +      CheckLastBatch((3, 2), (2, 2), (1, 1)),
    +      AddData(inputData, 4, 4, 4, 4),
    +      CheckLastBatch((4, 4), (3, 2), (2, 2), (1, 1))
    +    )
    +  }
    +
    +  test("simple count, append mode") {
    +    val inputData = MemoryStream[Int]
    +
    +    val aggregated =
    +      inputData.toDF()
    +        .groupBy($"value")
    +        .agg(count("*"))
    +        .as[(Int, Long)]
    +
    +    intercept[AnalysisException] {
    --- End diff --
    
    add checks on message


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message