Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14279#discussion_r75196517
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JSONOptions.scala
---
@@ -53,6 +55,12 @@ private[sql] class JSONOptions(
private val parseMode = parameters.getOrElse("mode", "PERMISSIVE")
val columnNameOfCorruptRecord =
parameters.get("columnNameOfCorruptRecord")
+ // Share date format object as it is expensive to parse date pattern.
+ val dateFormat: SimpleDateFormat = {
--- End diff --
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
Synchronization
Date formats are not synchronized. It is recommended to create separate
format instances for each thread. If multiple threads access a format
concurrently, it must be synchronized externally.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]