Github user brkyvz commented on a diff in the pull request:
https://github.com/apache/spark/pull/17735#discussion_r113518581
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala ---
@@ -120,6 +141,26 @@ 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()
+ val query =
+ df.union(df)
+ .writeStream
+ .format("memory")
+ .queryName("memory")
+ .start()
+ .asInstanceOf[StreamingQueryWrapper]
+ .streamingQuery
+ val executionRelations =
+ query
+ .logicalPlan
+ .collect { case ser: StreamingExecutionRelation => ser }
+ assert(executionRelations.size == 2)
+ assert(executionRelations.distinct.size == 1)
+ query.stop()
--- End diff --
can you please wrap this in a `finally`?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]