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/08 15:02:55 UTC
[GitHub] [spark] gengliangwang commented on a change in pull request #33268: [SPARK-36054][SQL] Support group by TimestampNTZ type column
gengliangwang commented on a change in pull request #33268:
URL: https://github.com/apache/spark/pull/33268#discussion_r666278223
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala
##########
@@ -1398,6 +1398,14 @@ class DataFrameAggregateSuite extends QueryTest
val df2 = Seq(Period.ofYears(1)).toDF("a").groupBy("a").count()
checkAnswer(df2, Row(Period.ofYears(1), 1))
}
+
+ test("SPARK-36054: Support group by TimestampNTZ column") {
+ val ts1 = "2021-01-01T00:00:00"
+ val ts2 = "2021-01-01T00:00:01"
+ val localDateTime = Seq(ts1, ts1, ts2).map(LocalDateTime.parse)
+ val df = localDateTime.toDF("ts").groupBy("ts").count().orderBy("ts")
+ checkAnswer(df, Seq(Row(LocalDateTime.parse(ts1), 2), Row(LocalDateTime.parse(ts2), 1)))
Review comment:
Done
--
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