You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/09 09:30:58 UTC

[GitHub] [spark] xuanyuanking commented on a change in pull request #27830: [SPARK-31030][SQL] Backward Compatibility for Parsing and formatting Datetime

xuanyuanking commented on a change in pull request #27830: [SPARK-31030][SQL] Backward Compatibility for Parsing and formatting Datetime
URL: https://github.com/apache/spark/pull/27830#discussion_r389545058
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -906,4 +906,35 @@ object DateTimeUtils {
     val days = period.getDays
     new CalendarInterval(months, days, 0)
   }
+
+  /**
+   * Since the Proleptic Gregorian calendar is de-facto calendar worldwide, as well as the chosen
+   * one in ANSI SQL standard, Spark 3.0 switches to it by using Java 8 API classes. However, the
+   * breaking changes between Java 7 and Java 8 pattern string will also breaks the backward
+   * compatibility of Spark 2.4 and earlier when parsing datetime. This function converts all
+   * incompatible pattern for the new parser in Spark 3.0. See more details in SPARK-31030.
+   *
+   * @param pattern - the input pattern.
 
 Review comment:
   Thanks, done in 82aa515.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org