Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27764 Feature Parity between PostgreSQL and Spark
  3. SPARK-30189

Interval from year-month/date-time string handling whitespaces

    XMLWordPrintableJSON

Details

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

    Description

      1. for pg feature parity
      2. for consistency with other types and other interval parser

       

      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)
      
      

      Attachments

        Issue Links

          Activity

            People

              Qin Yao Kent Yao 2
              Qin Yao Kent Yao 2
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: