You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2021/09/26 10:45:00 UTC

[jira] [Resolved] (SPARK-36851) Incorrect parsing of negative ANSI typed interval literals

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

Gengliang Wang resolved SPARK-36851.
------------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

Issue resolved by pull request 34107
[https://github.com/apache/spark/pull/34107]

> Incorrect parsing of negative ANSI typed interval literals
> ----------------------------------------------------------
>
>                 Key: SPARK-36851
>                 URL: https://issues.apache.org/jira/browse/SPARK-36851
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Max Gekk
>            Priority: Major
>             Fix For: 3.2.0
>
>
> If start field and end field are the same, parser doesn't take into account the sign before interval literal string. For example:
> Works fine:
> {code:sql}
> spark-sql> select interval -'1-1' year to month;
> -1-1
> {code}
> Incorrect result:
> {code:sql}
> spark-sql> select interval -'1' year;
> 1-0
> {code}



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