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/06 18:01:00 UTC

[jira] [Created] (SPARK-29365) Support date and timestamp subtraction

Maxim Gekk created SPARK-29365:
----------------------------------

             Summary: Support date and timestamp subtraction 
                 Key: SPARK-29365
                 URL: https://issues.apache.org/jira/browse/SPARK-29365
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 2.4.4
            Reporter: Maxim Gekk


PostgreSQL supports subtraction dates and timestamps:
{code}
maxim=# select date'2020-01-01' - timestamp'2019-10-06 10:11:12.345678';
        ?column?         
-------------------------
 86 days 13:48:47.654322
(1 row)

maxim=# select timestamp'2019-10-06 10:11:12.345678' - date'2020-01-01';
         ?column?          
---------------------------
 -86 days -13:48:47.654322
(1 row)
{code}
Need to provide the same feature in Spark SQL.



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