You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maxim Gekk (JIRA)" <ji...@apache.org> on 2019/08/11 18:39:00 UTC
[jira] [Updated] (SPARK-28420) Date/Time Functions: date_part for
intervals
[ https://issues.apache.org/jira/browse/SPARK-28420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maxim Gekk updated SPARK-28420:
-------------------------------
Summary: Date/Time Functions: date_part for intervals (was: Date/Time Functions: date_part)
> Date/Time Functions: date_part for intervals
> --------------------------------------------
>
> Key: SPARK-28420
> URL: https://issues.apache.org/jira/browse/SPARK-28420
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Yuming Wang
> Priority: Major
>
> ||Function||Return Type||Description||Example||Result||
> |{{date_part(}}{{text}}{{, }}{{timestamp}}{{)}}|{{double precision}}|Get subfield (equivalent to {{extract}}); see [Section 9.9.1|https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT]|{{date_part('hour', timestamp '2001-02-16 20:38:40')}}|{{20}}|
> |{{date_part(}}{{text}}{{, }}{{interval}}{{)}}|{{double precision}}|Get subfield (equivalent to {{extract}}); see [Section 9.9.1|https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT]|{{date_part('month', interval '2 years 3 months')}}|{{3}}|
> We can replace it with {{extract(field from timestamp)}}.
> https://www.postgresql.org/docs/11/functions-datetime.html
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org