You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/15 14:01:06 UTC
[GitHub] [spark] gengliangwang commented on a change in pull request #33341: [SPARK-36091][SQL] Support TimestampNTZ type in expression TimeWindow
gengliangwang commented on a change in pull request #33341:
URL: https://github.com/apache/spark/pull/33341#discussion_r670491401
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameTimeWindowingSuite.scala
##########
@@ -27,177 +29,234 @@ class DataFrameTimeWindowingSuite extends QueryTest with SharedSparkSession {
import testImplicits._
test("simple tumbling window with record at window start") {
- val df = Seq(
- ("2016-03-27 19:39:30", 1, "a")).toDF("time", "value", "id")
-
- checkAnswer(
- df.groupBy(window($"time", "10 seconds"))
- .agg(count("*").as("counts"))
- .orderBy($"window.start".asc)
- .select($"window.start".cast("string"), $"window.end".cast("string"), $"counts"),
- Seq(
- Row("2016-03-27 19:39:30", "2016-03-27 19:39:40", 1)
+ def doTest(df: DataFrame): Unit = {
Review comment:
Nit: Shall we use a loop instead of defining functions..? e.g. `Seq(df1, df2).foreach...`
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org