Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.5.0
Description
In the spark.python.pyspark.sql.functions module, at 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".
From the official documentation:
df = spark.createDataFrame([('2015-04-08',)], ['dt']) df.select(date_format('dt', 'MM/dd/yyy').alias('date')).collect() [Row(date='04/08/2015')]
As a solution, I proposed the PR https://github.com/apache/spark/pull/43442.
Attachments
Attachments
Issue Links
- links to