You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2024/02/16 07:55:00 UTC

[jira] [Created] (SPARK-47072) Wrong error message for incorrect ANSI intervals

Max Gekk created SPARK-47072:
--------------------------------

             Summary: Wrong error message for incorrect ANSI intervals
                 Key: SPARK-47072
                 URL: https://issues.apache.org/jira/browse/SPARK-47072
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 4.0.0
            Reporter: Max Gekk
            Assignee: Max Gekk


When Spark SQL cannot recognise ANSI interval, it outputs wrong pattern for particular ANSI interval. For example, it cannot recognise year-month interval, but says about day-time interval:

{code:sql}
spark-sql (default)> select interval '-\t2-2\t' year to month;

Interval string does not match year-month format of `[+|-]d h`, `INTERVAL [+|-]'[+|-]d h' DAY TO HOUR` when cast to interval year to month: -	2-2	. (line 1, pos 16)

== SQL ==
select interval '-\t2-2\t' year to month
----------------^^^
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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