-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-45611][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function #43442
Conversation
Mind taking a look at https://github.com/apache/spark/pull/43442/checks?check_run_id=17836826969? Let's also file a JIRA, see also https://spark.apache.org/contributing.html |
It should be fine now. I will open a Jira issue later on today. |
Issue (https://issues.apache.org/jira/browse/SPARK-45611) created and also attaching it to the PR. |
Merged to master. |
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.
LGTM later.
@@ -6784,7 +6784,7 @@ def date_format(date: "ColumnOrName", format: str) -> Column: | |||
Examples | |||
-------- | |||
>>> df = spark.createDataFrame([('2015-04-08',)], ['dt']) | |||
>>> df.select(date_format('dt', 'MM/dd/yyy').alias('date')).collect() | |||
>>> df.select(date_format('dt', 'MM/dd/yyyy').alias('date')).collect() |
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.
This might be a typo but not a bug because 3-y means minimum number not exact number.
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.
We should run all examples, and as you can see the output is correct.
Based on the issue https://issues.apache.org/jira/browse/SPARK-45611
What changes were proposed in this pull request?
In the
date_format
method's doctest, there is a typo in the year format. Instead of 'MM/dd/yyy'
, it should be'MM/dd/yyyy'
as the expected output[Row(date='04/08/2015')]
indicates the following format"MM/dd/yyyy"
Was this patch authored or co-authored using generative AI tooling?
No