This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 6953b003797 [SPARK-45611][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function 6953b003797 is described below commit 6953b003797559786f46343cf8d7905464e14641 Author: Mete Can Akar <metecana...@gmail.com> AuthorDate: Fri Oct 20 09:11:30 2023 +0900 [SPARK-45611][PYTHON][DOCS] Typo fixed yyy to yyyy at date_format function 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 Closes #43442 from metecanakar/fix/typo-in-data-format. Lead-authored-by: Mete Can Akar <metecana...@gmail.com> Co-authored-by: Mete Can Akar <10785597+metecana...@users.noreply.github.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/sql/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 7807919ce2c..74ecc77e7d7 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -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() [Row(date='04/08/2015')] """ return _invoke_function("date_format", _to_java_column(date), format) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org