You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2019/06/27 03:14:00 UTC

[jira] [Updated] (SPARK-28171) Correct interval type conversion behavior

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

Yuming Wang updated SPARK-28171:
--------------------------------
    Issue Type: Sub-task  (was: Bug)
        Parent: SPARK-27764

> Correct interval type conversion behavior 
> ------------------------------------------
>
>                 Key: SPARK-28171
>                 URL: https://issues.apache.org/jira/browse/SPARK-28171
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Zhu, Lipeng
>            Priority: Major
>
> When calculate between date and interval.
> {code:sql}
> select timestamp '2019-01-01 00:00:00' + interval '1 2:03:04' day to second, timestamp '2019-01-01 00:00:00' + interval '-1 2:03:04' day to second
> {code}
>  * PostgreSQL return *2019-01-02 02:03:04*    *2018-12-31 02:03:04*
>  * SparkSQL return    *2019-01-02 02:03:04*    *2018-12-30 21:56:56*
> {code:sql}
> select timestamp '2019-01-01 00:00:00' + interval '1 -2:03:04' day to second, timestamp '2019-01-01 00:00:00' + interval '-1 -2:03:04' day to second
> {code}
>  * PostgreSQL return *2019-01-01 21:56:56*    *2018-12-30 21:56:56*
>  * SparkSQL return    _*Interval string does not match day-time format of 'd h:m:s.n': '1 -2:03:04'(line 1, pos 50)*_



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