[
https://issues.apache.org/jira/browse/SPARK-30189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan reassigned SPARK-30189:
-----------------------------------
Assignee: Kent Yao
> Interval from year-month/date-time string handling whitespaces
> --------------------------------------------------------------
>
> Key: SPARK-30189
> URL: https://issues.apache.org/jira/browse/SPARK-30189
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Kent Yao
> Assignee: Kent Yao
> Priority: Major
>
> # for pg feature parity
> # for consistency with other types and other interval parser
>
> {code:sql}
> ostgres=# select interval E'2-2\t' year to month;
> interval
> ----------------
> 2 years 2 mons
> (1 row)
> postgres=# select interval E'2-2\t' year to month;
> interval
> ----------------
> 2 years 2 mons
> (1 row)
> postgres=# select interval E'2-\t2\t' year to month;
> ERROR: invalid input syntax for type interval: "2- 2 "
> LINE 1: select interval E'2-\t2\t' year to month;
> ^
> postgres=# select interval '2 00:00:01' day to second;
> interval
> -----------------
> 2 days 00:00:01
> (1 row)
> postgres=# select interval '- 2 00:00:01' day to second;
> interval
> -------------------
> -2 days +00:00:01
> (1 row)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]