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



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -217,9 +217,18 @@ private object DateTimeFormatterHelper {
     toFormatter(builder, TimestampFormatter.defaultLocale)
   }
 
+  final val bugInStandAloneForm = {
+    // Java 8 has a bug for stand-alone form. See 
https://bugs.openjdk.java.net/browse/JDK-8114833
+    // Note: we only check the US locale so that it's a static check. It can 
produce false-negative
+    // as some locales are not affected by the bug. Since `L` is rarely used, 
we choose to not
+    // complicate the check here.
+    // TODO: remove it when we drop Java 8 support.
+    val formatter = DateTimeFormatter.ofPattern("LLL", Locale.US)
+    formatter.format(LocalDate.of(2000, 1, 1)) == "1"

Review comment:
       So, we are sure 'LLL' and 'qqq' have the same problems. Can you check 
'qqq' here as well?
   ```scala
       val formatter = DateTimeFormatter.ofPattern("LLL qqq", Locale.US)
       formatter.format(LocalDate.of(2000, 1, 1)) == "1 Q1"
   ```




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



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

Reply via email to