Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/15949#discussion_r89424405
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/streaming/WatermarkSuite.scala ---
@@ -96,28 +96,58 @@ class WatermarkSuite extends StreamTest with
BeforeAndAfter with Logging {
)
}
- ignore("recovery") {
- val inputData = MemoryStream[Int]
-
- val windowedAggregation = inputData.toDF()
+ test("recovery") {
+ val ms = new MemoryStream[Int](0, sqlContext)
+ val df = ms.toDF().toDF("a")
+ val tableName = "recovery"
+ def startQuery: StreamingQuery = {
+ ms.toDF()
.withColumn("eventTime", $"value".cast("timestamp"))
.withWatermark("eventTime", "10 seconds")
.groupBy(window($"eventTime", "5 seconds") as 'window)
.agg(count("*") as 'count)
.select($"window".getField("start").cast("long").as[Long],
$"count".as[Long])
+ .writeStream
+ .format("memory")
+ .queryName(tableName)
--- End diff --
i think this is not testing it correctly! you are not even setting
checkpoint directory. so offset log is not recovered.
---
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]