You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (Jira)" <ji...@apache.org> on 2019/09/14 05:41:00 UTC
[jira] [Resolved] (SPARK-28171) Difference of interval type
conversion between SparkSQL and PostgreSQL
[ https://issues.apache.org/jira/browse/SPARK-28171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao Li resolved SPARK-28171.
-----------------------------
Resolution: Later
> 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.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org