HeartSaVioR commented on a change in pull request #26201: [SPARK-29543][SS][UI]
Init structured streaming ui
URL: https://github.com/apache/spark/pull/26201#discussion_r348359850
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
##########
@@ -1102,6 +1102,84 @@ class StreamingQuerySuite extends StreamTest with
BeforeAndAfter with Logging wi
}
}
+ test("stream query summary with mixed batch and streaming V1 sources") {
+ val streamingTriggerDF = spark.createDataset(1 to 10).toDF
+ val streamingInputDF =
createSingleTriggerStreamingDF(streamingTriggerDF).toDF("value")
+ val staticInputDF = spark.createDataFrame(Seq(1 -> "1", 2 ->
"2")).toDF("value", "anotherValue")
+
+ // Trigger input has 10 rows, static input has 2 rows,
+ // therefore after the first trigger, the calculated input rows should be
10
+ val querySummary = getQuerySummary(streamingInputDF.join(staticInputDF,
"value"))
Review comment:
Let's add a private method for asserting total input records to deduplicate
all assertions below. The method can receive StreamingQuery as parameter, then
all assertions would fit the method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]