srowen 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_r262046148
 
 

 ##########
 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:
   OK, last nit then: this should probably use the naming convention for 
constants, `FRACTION_PATTERN`.
   How about just a method to return this formatter, rather than a special 
constant that causes another method to return it?

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