Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27790 Support ANSI SQL INTERVAL types
  3. SPARK-36851

Incorrect parsing of negative ANSI typed interval literals

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • SQL
    • None

    Description

      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:

      spark-sql> select interval -'1-1' year to month;
      -1-1
      

      Incorrect result:

      spark-sql> select interval -'1' year;
      1-0
      

      Attachments

        Activity

          People

            penglei Peng Lei
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: