&#010;&#010;== Results ==&#010;!== Correct Answer - 3 == == Spark Answer - 2 ==&#010;!struct<_1:int,_2:int> struct<_1:int,count:bigint>&#010;![1,1] [2,1]&#010;![2,2] [3,1]&#010;![3,1] &#010; &#010;&#010;== Progress ==&#010; AddData to MemoryStream[_1#476776,_2#476777]: (1,0),(2,0)&#010; StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@2d66a84,Map(spark.sql.shuffle.partitions -> 2),null)&#010; CheckAnswer: [1,1],[2,1]&#010; StopStream&#010; AddData to MemoryStream[_1#476776,_2#476777]: (3,0),(2,0)&#010; StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@674714aa,Map(spark.sql.shuffle.partitions -> 5),null)&#010;=> CheckAnswer: [1,1],[2,2],[3,1]&#010; StopStream&#010; AddData to MemoryStream[_1#476776,_2#476777]: (3,0),(1,0)&#010; StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@7ea994e7,Map(spark.sql.shuffle.partitions -> 1),null)&#010; CheckAnswer: [1,2],[2,2],[3,2]&#010;&#010;== Stream ==&#010;Output Mode: Complete&#010;Stream state: {MemoryStream[_1#476776,_2#476777]: 1}&#010;Thread state: alive&#010;Thread stack trace: java.lang.Thread.sleep(Native Method)&#010;org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1.apply$mcZ$sp(MicroBatchExecution.scala:211)&#010;org.apache.spark.sql.execution.streaming.ProcessingTimeExecutor.execute(TriggerExecutor.scala:56)&#010;org.apache.spark.sql.execution.streaming.MicroBatchExecution.runActivatedStream(MicroBatchExecution.scala:160)&#010;org.apache.spark.sql.execution.streaming.StreamExecution.org$apache$spark$sql$execution$streaming$StreamExecution$$runStream(StreamExecution.scala:279)&#010;org.apache.spark.sql.execution.streaming.StreamExecution$$anon$1.run(StreamExecution.scala:189)&#010;&#010;&#010;== Sink ==&#010;1: [2,1] [3,1]&#010;&#010;&#010;== Plan ==&#010;== Parsed Logical Plan ==&#010;Aggregate [_1#476776], [_1#476776, count(1) AS count#476782L]&#010;+- Project [_1#476815 AS _1#476776, _2#476816 AS _2#476777]&#010; +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]&#010;&#010;== Analyzed Logical Plan ==&#010;_1: int, count: bigint&#010;Aggregate [_1#476776], [_1#476776, count(1) AS count#476782L]&#010;+- Project [_1#476815 AS _1#476776, _2#476816 AS _2#476777]&#010; +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]&#010;&#010;== Optimized Logical Plan ==&#010;Aggregate [_1#476815], [_1#476815, count(1) AS count#476782L]&#010;+- Project [_1#476815]&#010; +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]&#010;&#010;== Physical Plan ==&#010;*(3) HashAggregate(keys=[_1#476815], functions=[count(1)], output=[_1#476815, count#476782L])&#010;+- StateStoreSave [_1#476815], state info [ checkpoint = *********(redacted)/jenkins/workspace/spark-master-test-maven-hadoop-2.6-ubuntu-testing/sql/core/target/tmp/streaming.metadata-b3fe3ecf-e823-4c56-ac15-29a1a99ab84e/state, runId = 24612480-699a-40a0-83cb-febf452d3649, opId = 0, ver = 1, numPartitions = 2], Complete, 0&#010; +- *(2) HashAggregate(keys=[_1#476815], functions=[merge_count(1)], output=[_1#476815, count#476811L])&#010; +- StateStoreRestore [_1#476815], state info [ checkpoint = *********(redacted)/jenkins/workspace/spark-master-test-maven-hadoop-2.6-ubuntu-testing/sql/core/target/tmp/streaming.metadata-b3fe3ecf-e823-4c56-ac15-29a1a99ab84e/state, runId = 24612480-699a-40a0-83cb-febf452d3649, opId = 0, ver = 1, numPartitions = 2]&#010; +- Exchange hashpartitioning(_1#476815, 2)&#010; +- *(1) HashAggregate(keys=[_1#476815], functions=[merge_count(1)], output=[_1#476815, count#476811L])&#010; +- *(1) HashAggregate(keys=[_1#476815], functions=[partial_count(1)], output=[_1#476815, count#476811L])&#010; +- *(1) Project [_1#476815]&#010; +- *(1) Project [_1#476815, _2#476816]&#010; +- *(1) ScanV2 MemoryStreamDataSource$[_1#476815, _2#476816]&#010; &#010;


      org.scalatest.exceptions.TestFailedException: 

== Results ==
!== Correct Answer - 3 ==   == Spark Answer - 2 ==
!struct<_1:int,_2:int>      struct<_1:int,count:bigint>
![1,1]                      [2,1]
![2,2]                      [3,1]
![3,1]                      
    

== Progress ==
   AddData to MemoryStream[_1#476776,_2#476777]: (1,0),(2,0)
   StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@2d66a84,Map(spark.sql.shuffle.partitions -> 2),null)
   CheckAnswer: [1,1],[2,1]
   StopStream
   AddData to MemoryStream[_1#476776,_2#476777]: (3,0),(2,0)
   StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@674714aa,Map(spark.sql.shuffle.partitions -> 5),null)
=> CheckAnswer: [1,1],[2,2],[3,1]
   StopStream
   AddData to MemoryStream[_1#476776,_2#476777]: (3,0),(1,0)
   StartStream(ProcessingTime(0),org.apache.spark.util.SystemClock@7ea994e7,Map(spark.sql.shuffle.partitions -> 1),null)
   CheckAnswer: [1,2],[2,2],[3,2]

== Stream ==
Output Mode: Complete
Stream state: {MemoryStream[_1#476776,_2#476777]: 1}
Thread state: alive
Thread stack trace: java.lang.Thread.sleep(Native Method)
org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1.apply$mcZ$sp(MicroBatchExecution.scala:211)
org.apache.spark.sql.execution.streaming.ProcessingTimeExecutor.execute(TriggerExecutor.scala:56)
org.apache.spark.sql.execution.streaming.MicroBatchExecution.runActivatedStream(MicroBatchExecution.scala:160)
org.apache.spark.sql.execution.streaming.StreamExecution.org$apache$spark$sql$execution$streaming$StreamExecution$$runStream(StreamExecution.scala:279)
org.apache.spark.sql.execution.streaming.StreamExecution$$anon$1.run(StreamExecution.scala:189)


== Sink ==
1: [2,1] [3,1]


== Plan ==
== Parsed Logical Plan ==
Aggregate [_1#476776], [_1#476776, count(1) AS count#476782L]
+- Project [_1#476815 AS _1#476776, _2#476816 AS _2#476777]
   +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]

== Analyzed Logical Plan ==
_1: int, count: bigint
Aggregate [_1#476776], [_1#476776, count(1) AS count#476782L]
+- Project [_1#476815 AS _1#476776, _2#476816 AS _2#476777]
   +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]

== Optimized Logical Plan ==
Aggregate [_1#476815], [_1#476815, count(1) AS count#476782L]
+- Project [_1#476815]
   +- Streaming RelationV2 MemoryStreamDataSource$[_1#476815, _2#476816]

== Physical Plan ==
*(3) HashAggregate(keys=[_1#476815], functions=[count(1)], output=[_1#476815, count#476782L])
+- StateStoreSave [_1#476815], state info [ checkpoint = *********(redacted)/jenkins/workspace/spark-master-test-maven-hadoop-2.6-ubuntu-testing/sql/core/target/tmp/streaming.metadata-b3fe3ecf-e823-4c56-ac15-29a1a99ab84e/state, runId = 24612480-699a-40a0-83cb-febf452d3649, opId = 0, ver = 1, numPartitions = 2], Complete, 0
   +- *(2) HashAggregate(keys=[_1#476815], functions=[merge_count(1)], output=[_1#476815, count#476811L])
      +- StateStoreRestore [_1#476815], state info [ checkpoint = *********(redacted)/jenkins/workspace/spark-master-test-maven-hadoop-2.6-ubuntu-testing/sql/core/target/tmp/streaming.metadata-b3fe3ecf-e823-4c56-ac15-29a1a99ab84e/state, runId = 24612480-699a-40a0-83cb-febf452d3649, opId = 0, ver = 1, numPartitions = 2]
         +- Exchange hashpartitioning(_1#476815, 2)
            +- *(1) HashAggregate(keys=[_1#476815], functions=[merge_count(1)], output=[_1#476815, count#476811L])
               +- *(1) HashAggregate(keys=[_1#476815], functions=[partial_count(1)], output=[_1#476815, count#476811L])
                  +- *(1) Project [_1#476815]
                     +- *(1) Project [_1#476815, _2#476816]
                        +- *(1) ScanV2 MemoryStreamDataSource$[_1#476815, _2#476816]
         
         
      at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:528)
      at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1560)
      at org.scalatest.Assertions$class.fail(Assertions.scala:1089)
      at org.scalatest.FunSuite.fail(FunSuite.scala:1560)
      at org.apache.spark.sql.streaming.StreamTest$class.failTest$1(StreamTest.scala:450)
      at org.apache.spark.sql.streaming.StreamTest$$anonfun$executeAction$1$18.apply(StreamTest.scala:725)
      at org.apache.spark.sql.streaming.StreamTest$$anonfun$executeAction$1$18.apply(StreamTest.scala:725)
      at scala.Option.foreach(Option.scala:257)
      at org.apache.spark.sql.streaming.StreamTest$class.executeAction$1(StreamTest.scala:724)
      at org.apache.spark.sql.streaming.StreamTest$$anonfun$liftedTree1$1$1.apply(StreamTest.scala:767)
      at org.apache.spark.sql.streaming.StreamTest$$anonfun$liftedTree1$1$1.apply(StreamTest.scala:754)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
      at org.apache.spark.sql.streaming.StreamTest$class.liftedTree1$1(StreamTest.scala:754)
      at org.apache.spark.sql.streaming.StreamTest$class.testStream(StreamTest.scala:753)
      at org.apache.spark.sql.streaming.StreamSuite.testStream(StreamSuite.scala:48)
      at org.apache.spark.sql.streaming.StreamSuite$$anonfun$23.apply$mcV$sp(StreamSuite.scala:698)
      at org.apache.spark.sql.streaming.StreamSuite$$anonfun$23.apply(StreamSuite.scala:694)
      at org.apache.spark.sql.streaming.StreamSuite$$anonfun$23.apply(StreamSuite.scala:694)
      at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      at org.scalatest.Transformer.apply(Transformer.scala:22)
      at org.scalatest.Transformer.apply(Transformer.scala:20)
      at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
      at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:103)
      at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:183)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196)
      at org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
      at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:196)
      at org.apache.spark.sql.streaming.StreamSuite.org$scalatest$BeforeAndAfterEach$$super$runTest(StreamSuite.scala:48)
      at org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:221)
      at org.apache.spark.sql.streaming.StreamSuite.runTest(StreamSuite.scala:48)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:396)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:384)
      at scala.collection.immutable.List.foreach(List.scala:392)
      at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
      at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:379)
      at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461)
      at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:229)
      at org.scalatest.FunSuite.runTests(FunSuite.scala:1560)
      at org.scalatest.Suite$class.run(Suite.scala:1147)
      at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1560)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233)
      at org.scalatest.SuperEngine.runImpl(Engine.scala:521)
      at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:233)
      at org.apache.spark.SparkFunSuite.org$scalatest$BeforeAndAfterAll$$super$run(SparkFunSuite.scala:52)
      at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:213)
      at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:210)
      at org.apache.spark.SparkFunSuite.run(SparkFunSuite.scala:52)
      at org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1210)
      at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1257)
      at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1255)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
      at org.scalatest.Suite$class.runNestedSuites(Suite.scala:1255)
      at org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:30)
      at org.scalatest.Suite$class.run(Suite.scala:1144)
      at org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:30)
      at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1340)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1334)
      at scala.collection.immutable.List.foreach(List.scala:392)
      at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1011)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1010)
      at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500)
      at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
      at org.scalatest.tools.Runner$.main(Runner.scala:827)
      at org.scalatest.tools.Runner.main(Runner.scala)