spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashley (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-30392) Documentation for the date_trunc function is incorrect
Date Mon, 30 Dec 2019 20:03:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-30392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ashley updated SPARK-30392:
---------------------------
    Description: 
The documentation for the date_trunc function includes a few sample SELECT statements to show
how the function works: [https://spark.apache.org/docs/2.3.0/api/sql/#date_trunc]

In the sample SELECT statements, the inputs to the function are swapped:

*The docs show:* SELECT date_trunc('2015-03-05T09:32:05.359', 'YEAR'); 
 *The docs _should_ show:* SELECT date_trunc('YEAR', '2015-03-05T09:32:05.359');

 

  was:
The documentation for the date_trunc function includes a few sample SELECT statements to show
how the function works: [https://spark.apache.org/docs/2.3.0/api/sql/#date_trunc]

In the sample SELECT statements, the inputs to the function are swapped:

*The docs show:* SELECT date_trunc('2015-03-05T09:32:05.359', 'YEAR'); 
*The docs _should_ show:* SELECT date_trunc('YEAR', '2015-03-05T09:32:05.359');

!image-2019-12-30-15-00-36-359.png|width=709,height=462!


> Documentation for the date_trunc function is incorrect
> ------------------------------------------------------
>
>                 Key: SPARK-30392
>                 URL: https://issues.apache.org/jira/browse/SPARK-30392
>             Project: Spark
>          Issue Type: Documentation
>          Components: SQL
>    Affects Versions: 2.4.3
>            Reporter: Ashley
>            Priority: Minor
>         Attachments: Date_trunc.PNG
>
>
> The documentation for the date_trunc function includes a few sample SELECT statements
to show how the function works: [https://spark.apache.org/docs/2.3.0/api/sql/#date_trunc]
> In the sample SELECT statements, the inputs to the function are swapped:
> *The docs show:* SELECT date_trunc('2015-03-05T09:32:05.359', 'YEAR'); 
>  *The docs _should_ show:* SELECT date_trunc('YEAR', '2015-03-05T09:32:05.359');
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message