-
Notifications
You must be signed in to change notification settings - Fork 29k
[MINOR][SQL][DOCS][2.4] Fix the timestamp pattern in the example for to_timestamp
#27438
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 1 commit
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 |
|---|---|---|
|
|
@@ -2949,10 +2949,10 @@ object functions { | |
| def unix_timestamp(s: Column, p: String): Column = withExpr { UnixTimestamp(s.expr, Literal(p)) } | ||
|
|
||
| /** | ||
| * Converts to a timestamp by casting rules to `TimestampType`. | ||
| * Converts to a timestamp by casting rules to `TimestampType` in the seconds precision. | ||
HyukjinKwon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * | ||
| * @param s 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` | ||
| * cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss` | ||
HyukjinKwon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * @return A timestamp, or null if the input was a string that could not be cast to a timestamp | ||
| * @group datetime_funcs | ||
| * @since 2.2.0 | ||
|
|
@@ -2962,12 +2962,12 @@ object functions { | |
| } | ||
|
|
||
| /** | ||
| * Converts time string with the given pattern to timestamp. | ||
| * Converts time string with the given pattern to timestamp in the seconds precision. | ||
HyukjinKwon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * | ||
| * See [[java.text.SimpleDateFormat]] for valid date and time format patterns | ||
|
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. If you don't mind, I would like to say here that currently supported pattern for seconds fractions is |
||
| * | ||
| * @param s 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` | ||
|
Contributor
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. what's wrong with ".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.
Contributor
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. for 1), is it fixed in 2.4 or not? for 2), have we documented it?
Member
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-29904 is merged at 2.4.5. In the worst case, we can revert @MaxGekk 's #26507 because of this.
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.
@cloud-fan It is fixed in JSON and CSV datasources only but not for
I have tried to document it here in the PR
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.
@dongjoon-hyun Why? What's the worst case? I do think we should apply the fix in other places but not reverting it.
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. @cloud-fan I tried to document the restriction of
Member
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. @MaxGekk . To be clear, I want to make it sure we don't have any regression at 2.4.5 as a release manager. You raised this issue and we are investigating the relevant PRs. That's all. We are considering the scope and effect. So far, we didn't make any decision. |
||
| * cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss` | ||
| * @param fmt A date time pattern detailing the format of `s` when `s` is a string | ||
| * @return A timestamp, or null if `s` was a string that could not be cast to a timestamp or | ||
| * `fmt` was an invalid format | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.