-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28471][SQL][DOC][FOLLOWUP] Fix year patterns in the comments of date-time expressions #25796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -67,7 +67,7 @@ class Iso8601TimestampFormatter( | |||
| } | ||||
|
|
||||
| /** | ||||
| * The formatter parses/formats timestamps according to the pattern `yyyy-MM-dd HH:mm:ss.[..fff..]` | ||||
| * The formatter parses/formats timestamps according to the pattern `uuuu-MM-dd HH:mm:ss.[..fff..]` | ||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala Line 90 in 60be6d2
uuuu
|
||||
| * where `[..fff..]` is a fraction of second up to microsecond resolution. The formatter does not | ||||
| * output trailing zeros in the fraction. For example, the timestamp `2019-03-05 15:00:01.123400` is | ||||
| * formatted as the string `2019-03-05 15:00:01.1234`. | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2634,8 +2634,8 @@ object functions { | |
| * See [[java.time.format.DateTimeFormatter]] for valid date and time format patterns | ||
| * | ||
| * @param dateExpr A date, timestamp or string. If a string, the data must be in a format that | ||
| * can be cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss.SSSS` | ||
| * @param format A pattern `dd.MM.yyyy` would return a string like `18.03.1993` | ||
| * can be cast to a timestamp, such as `uuuu-MM-dd` or `uuuu-MM-dd HH:mm:ss.SSSS` | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It uses |
||
| * @param format A pattern `dd.MM.uuuu` would return a string like `18.03.1993` | ||
| * @return A string, or null if `dateExpr` was a string that could not be cast to a timestamp | ||
| * @note Use specialized functions like [[year]] whenever possible as they benefit from a | ||
| * specialized implementation. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at https://github.com/apache/spark/pull/25796/files#diff-b83497f7bc11578a0b63a814a2a30f48L677