MaxGekk commented on a change in pull request #23936: [SPARK-27031][SQL] Avoid 
double formatting in timestampToString
URL: https://github.com/apache/spark/pull/23936#discussion_r262124283
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala
 ##########
 @@ -81,4 +81,8 @@ object TimestampFormatter {
   def apply(timeZone: TimeZone): TimestampFormatter = {
     apply(defaultPattern, timeZone, defaultLocale)
   }
+
+  def getFractionFormatter(timeZone: TimeZone): TimestampFormatter = {
+    apply(DateTimeFormatterHelper.fractionPattern, timeZone, defaultLocale)
 
 Review comment:
   I have to support only one locale `Locale.US` but I think it is ok for this 
case. If we will need the fraction formatter for multiple locales, we can come 
back to the original solution with caching.

----------------------------------------------------------------
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]

Reply via email to