cloud-fan commented on a change in pull request #33346:
URL: https://github.com/apache/spark/pull/33346#discussion_r670106487



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
##########
@@ -98,10 +98,10 @@ class DateExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
 
   test("datetime function localtimestamp") {
     outstandingTimezonesIds.foreach { zid =>
+      val zoneId = DateTimeUtils.getZoneId(zid)
       val ct = LocalTimestamp(Some(zid)).eval(EmptyRow).asInstanceOf[Long]
-      val t1 = DateTimeUtils.localDateTimeToMicros(
-        LocalDateTime.now(DateTimeUtils.getZoneId(zid)))
-      assert(math.abs(t1 - ct) < 5000)
+      val t1 = DateTimeUtils.localDateTimeToMicros(LocalDateTime.now(zoneId))
+      assert(math.abs(t1 - ct) < 1000000)

Review comment:
       Actually the current_timestamp test has the same DST issue and the test 
is working pretty well. It should be fine.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to