spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takeshi Yamamuro (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-28171) Difference of interval type conversion between SparkSQL and PostgreSQL
Date Sun, 29 Dec 2019 00:55:00 GMT

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

Takeshi Yamamuro updated SPARK-28171:
-------------------------------------
    Parent Issue: SPARK-30375  (was: SPARK-27764)

> Difference of interval type conversion between SparkSQL and PostgreSQL
> ----------------------------------------------------------------------
>
>                 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
(v8.3.4#803005)

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


Mime
View raw message