You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2017/05/02 21:06:16 UTC

[GitHub] spark pull request #17735: [SPARK-20441][SPARK-20432][SS] Within the same st...

Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17735#discussion_r114425160
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala ---
    @@ -120,6 +141,32 @@ class StreamSuite extends StreamTest {
         assertDF(df)
       }
     
    +  test("Within the same streaming query, one StreamingRelation should only be transformed to one " +
    +    "StreamingExecutionRelation") {
    +    val df = spark.readStream.format(classOf[FakeDefaultSource].getName).load()
    +    var query: StreamExecution = null
    +    try {
    +      query =
    +        df.union(df)
    +          .writeStream
    +          .format("memory")
    +          .queryName("memory")
    +          .start()
    +          .asInstanceOf[StreamingQueryWrapper]
    +          .streamingQuery
    +      val executionRelations =
    +        query
    +          .logicalPlan
    --- End diff --
    
    you need to call `query.awaitInitialization` before accessing `logicalPlan`. Otherwise this test will be flaky.


---
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