- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 06:53 AM - edited 03-13-2024 06:54 AM
Hi all,
In my notebook, when I run my cell with following code
%sql
I get '1', while I expect 'Jan' according to the doc
https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html
I would also expect the following to return 'January', but I get '1' instead
- Labels:
-
Spark
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 02:36 AM - edited 04-09-2024 02:38 AM
Hi @Retired_mod ,
Turns out it was actually a Java 8 bug:
IllegalArgumentException: Java 8 has a bug to support stand-alone form (3 or more 'L' or 'q' in the pattern string). Please use 'M' or 'Q' instead, or upgrade your Java version. For more details, please read https://bugs.openjdk.java.net/browse/JDK-8114833
Upgarding to Java 11 fixed the issue.
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:30 AM
Hi @Retired_mod ,
Thanks for your detailed answer. If I read you correctly, this means the spark docuementation is incorrect. I copy-pasted my queries direclty from the documentation examples, but can't reproduce them.
My cluster is runnig with Apache Spark 3.5.0, Scala 2.12.
Thanks and kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 02:36 AM - edited 04-09-2024 02:38 AM
Hi @Retired_mod ,
Turns out it was actually a Java 8 bug:
IllegalArgumentException: Java 8 has a bug to support stand-alone form (3 or more 'L' or 'q' in the pattern string). Please use 'M' or 'Q' instead, or upgrade your Java version. For more details, please read https://bugs.openjdk.java.net/browse/JDK-8114833
Upgarding to Java 11 fixed the issue.
Kind regards

