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 2020/11/20 18:07:52 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function

dongjoon-hyun commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r527883830



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -1947,6 +1947,12 @@ class DatasetSuite extends QueryTest
       df.where($"zoo".contains(Array('a', 'b'))),
       Seq(Row("abc")))
   }
+
+  test("SPARK-33469: Add current_timezone function") {
+    val df = Seq(1).toDF("c")
+    val timezone = df.selectExpr("current_timezone()").collect().head.getString(0)
+    assert(timezone == SQLConf.get.sessionLocalTimeZone)

Review comment:
       For this test, is it possible to set `sessionLocalTimeZone` explicitly and check with it?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org