dongjoon-hyun commented on a change in pull request #24457: [SPARK-27340][SS] Alias on TimeWindow expression may cause watermark metadata lost URL: https://github.com/apache/spark/pull/24457#discussion_r363451556
########## File path: sql/core/src/test/scala/org/apache/spark/sql/streaming/EventTimeWatermarkSuite.scala ########## @@ -591,6 +591,17 @@ class EventTimeWatermarkSuite extends StreamTest with BeforeAndAfter with Matche } } + test("SPARK-27340: Alias on TimeWindow expression may cause watermark metadata lost") { + val inputData = MemoryStream[Int] + val aliasWindow = inputData.toDF() + .withColumn("eventTime", $"value".cast("timestamp")) + .withWatermark("eventTime", "10 seconds") + .select(window($"eventTime", "5 seconds") as 'aliasWindow) + + assert(aliasWindow.logicalPlan.output.exists( + _.metadata.contains(EventTimeWatermark.delayKey))) Review comment: Since this test case seems to fail on the master branch (as of today), the issue seems to exist still. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org