spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-24378) Incorrect examples for date_trunc function in spark 2.3.0
Date Thu, 24 May 2018 15:38:00 GMT

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

Hyukjin Kwon updated SPARK-24378:
---------------------------------
    Fix Version/s:     (was: 2.3.0)

> Incorrect examples for date_trunc function in spark 2.3.0
> ---------------------------------------------------------
>
>                 Key: SPARK-24378
>                 URL: https://issues.apache.org/jira/browse/SPARK-24378
>             Project: Spark
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.3.0
>            Reporter: Prakhar Gupta
>            Priority: Major
>
> Within Spark documentation for spark 2.3.0, Listed examples are incorrect.
> date_trunc(fmt, ts) - Returns timestamp {{ts}} truncated to the unit specified by the
format model {{fmt}}. {{fmt}} should be one of ["YEAR", "YYYY", "YY", "MON", "MONTH", "MM",
"DAY", "DD", "HOUR", "MINUTE", "SECOND", "WEEK", "QUARTER"]
> *Examples:*
> {{> SELECT date_trunc('2015-03-05T09:32:05.359', 'YEAR'); 2015-01-01T00:00:00 >
SELECT date_trunc('2015-03-05T09:32:05.359', 'MM'); 2015-03-01T00:00:00 > SELECT date_trunc('2015-03-05T09:32:05.359',
'DD'); 2015-03-05T00:00:00 > SELECT date_trunc('2015-03-05T09:32:05.359', 'HOUR'); 2015-03-05T09:00:00
}}
>  
> {{Examples should be date_trunc(format, value)}}
> {{SELECT date_trunc('YEAR','2015-03-05T09:32:05.359'); }}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message