MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL]
Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387683497
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
##########
@@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with
Matchers with SQLHelper {
expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+ checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
zoneId = getZoneId("GMT-01:00")
expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+ checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
zoneId = getZoneId("GMT+07:30")
expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+ checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
Review comment:
I have to leave the existing code only because of the case, see
https://github.com/apache/spark/pull/27753#discussion_r386240731
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]