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 2021/10/04 12:25:30 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #34153: [SPARK-36796][BUILD][CORE][SQL] Pass all `sql/core` and dependent modules UTs use Maven with JDK 17

MaxGekk commented on a change in pull request #34153:
URL: https://github.com/apache/spark/pull/34153#discussion_r721312517



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -322,6 +323,13 @@ private object DateTimeFormatterHelper {
             (isParsing && unsupportedLettersForParsing.contains(c))) {
             throw new IllegalArgumentException(s"Illegal pattern character: $c")
           }
+          // SPARK-36796: `select date_format('2018-11-17 13:33:33.333', 'B')` failed with Java 8,
+          // but use Java 17 will return `in the afternoon` because 'B' is used to represent
+          // `Pattern letters to output a day period` in Java 17 and disabled it here for
+          // compatibility with Java 8 behavior.
+          for (c <- patternPart if unknownPatternLetters.contains(c)) {

Review comment:
       SGTM since the pattern is not documented/supported http://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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