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

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateFormatter.scala
 ##########
 @@ -88,11 +88,18 @@ class LegacyFallbackDateFormatter(
 }
 
 object DateFormatter {
+  val defaultPattern: String = "yyyy-MM-dd"
+  val defaultLocale: Locale = Locale.US
+
   def apply(format: String, locale: Locale): DateFormatter = {
     if (SQLConf.get.legacyTimeParserEnabled) {
 
 Review comment:
   For clarification, I don't think we should treat the previous behaviour 
unreasonable ... I am okay with considering to remove that legacy configuration 
regarding that we're going ahead for 3.0, it causes some overhead about 
maintenance, and it blocks some features.
   
   Also, for clarification, it's kind of a breaking changes. Think about that 
the CSV codes were dependent on timestamp being inferred and suddenly it 
becomes strings after upgrade. Even, this behaviour was documented in 2.x (by 
referring `SimpleDateFormat`).

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

Reply via email to