Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47072

Wrong error message for incorrect ANSI intervals

    XMLWordPrintableJSON

Details

    Description

      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:

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

      Attachments

        Activity

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: