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/10/04 09:00:00 UTC

[jira] [Updated] (SPARK-29355) Support timestamps subtraction

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

Maxim Gekk updated SPARK-29355:
-------------------------------
    Description: 
||Operator||Example||Result||
|{{-}}|{{timestamp '2001-09-29 03:00' - timestamp '2001-09-27 12:00'}}|{{interval '1 day 15:00:00'}}|


https://www.postgresql.org/docs/11/functions-datetime.html

  was:
||Operator||Example||Result||
|{{+}}|{{date '2001-09-28' + interval '1 hour'}}|{{timestamp '2001-09-28 01:00:00'}}|
|{{-}}|{{date '2001-09-28' - interval '1 hour'}}|{{timestamp '2001-09-27 23:00:00'}}|
|{{-}}|{{timestamp '2001-09-29 03:00' - timestamp '2001-09-27 12:00'}}|{{interval '1 day 15:00:00'}}|
|{{*}}|{{900 * interval '1 second'}}|{{interval '00:15:00'}}|
|{{*}}|{{21 * interval '1 day'}}|{{interval '21 days'}}|
|{{*}}|{{double precision '3.5' * interval '1 hour'}}|{{interval '03:30:00'}}|
|{{/}}|{{interval '1 hour' / double precision '1.5'}}|{{interval '00:40:00'}}|


https://www.postgresql.org/docs/11/functions-datetime.html


> Support timestamps subtraction
> ------------------------------
>
>                 Key: SPARK-29355
>                 URL: https://issues.apache.org/jira/browse/SPARK-29355
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Priority: Major
>
> ||Operator||Example||Result||
> |{{-}}|{{timestamp '2001-09-29 03:00' - timestamp '2001-09-27 12:00'}}|{{interval '1 day 15:00:00'}}|
> https://www.postgresql.org/docs/11/functions-datetime.html



--
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