yaooqinn commented on a change in pull request #28646:
URL: https://github.com/apache/spark/pull/28646#discussion_r430520403
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -217,9 +217,15 @@ private object DateTimeFormatterHelper {
toFormatter(builder, TimestampFormatter.defaultLocale)
}
+ final val bugInStandAloneForm = {
+ val formatter = DateTimeFormatter.ofPattern("LLL", Locale.US)
Review comment:
Will this cause perf-regression for `json/csv` functions when the
user-specified Locale is able to produce the right result with `LLL`? e.g.
```
select to_csv(named_struct('date', date '1970-01-01'), map('dateFormat',
'LLL', 'locale', 'ZH'))
一月
```
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -217,9 +217,15 @@ private object DateTimeFormatterHelper {
toFormatter(builder, TimestampFormatter.defaultLocale)
}
+ final val bugInStandAloneForm = {
+ val formatter = DateTimeFormatter.ofPattern("LLL", Locale.US)
Review comment:
Maybe we can add some comments about this.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]