Skip to content
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

Closed

Conversation

metecanakar
Copy link
Contributor

@metecanakar metecanakar commented Oct 18, 2023

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

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon changed the title Typo fixed yyy to yyyy [MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy Oct 19, 2023
@HyukjinKwon HyukjinKwon changed the title [MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy [MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function Oct 19, 2023
@metecanakar
Copy link
Contributor Author

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.

@metecanakar
Copy link
Contributor Author

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

Issue (https://issues.apache.org/jira/browse/SPARK-45611) created and also attaching it to the PR.

@metecanakar metecanakar changed the title [MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function [SPARK-45611][MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function Oct 19, 2023
@metecanakar metecanakar changed the title [SPARK-45611][MINOR][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function [SPARK-45611][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function Oct 19, 2023
@HyukjinKwon
Copy link
Member

Merged to master.

Copy link
Contributor

@beliefer beliefer left a 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()
Copy link
Member

@MaxGekk MaxGekk Oct 20, 2023

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants