-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[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 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 |
|---|---|---|
|
|
@@ -2967,7 +2967,7 @@ object functions { | |
| * See [[java.text.SimpleDateFormat]] for valid date and time format patterns | ||
| * | ||
| * @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 | ||
|
|
||
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.
If you don't mind, I would like to say here that currently supported pattern for seconds fractions is
SSSonly. The second s fractions can be parsed but will be ignored while casting to TimestampType.