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_r386240731
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -242,22 +242,21 @@ object DateTimeUtils {
return None
}
} else if (i == 5 || i == 6) {
- if (b == 'Z') {
+ if (b == '-' || b == '+') {
Review comment:
`getZoneId()` is able to handle zone offsets w/ prefix `-` and `+` but it
doesn't support the format `7:3` like in
https://github.com/apache/spark/blob/ffc0935e64ddd56c40db1c1c7f3afb7e5e306861/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala#L164
. So, I have to keep the code for backward compatibility.
----------------------------------------------------------------
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]