MaxGekk commented on a change in pull request #23391: [SPARK-26456][SQL] Cast
date/timestamp to string by Date/TimestampFormatter
URL: https://github.com/apache/spark/pull/23391#discussion_r244530942
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
##########
@@ -457,7 +477,7 @@ object PartitioningUtils {
val dateTry = Try {
// try and parse the date, if no exception occurs this is a candidate to
be resolved as
// DateType
-
DateTimeUtils.getThreadLocalDateFormat(DateTimeUtils.defaultTimeZone()).parse(raw)
+ dateFormatter.parse(raw)
Review comment:
I don't think it makes sense to cache `timestampFormatter` because it is
created before parsing of all partitions:
https://github.com/apache/spark/pull/23391/files#diff-82f61c59249b9d78e6dbf943e19ed043R128
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]