XMLWordPrintableJSON

Details

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

    Description

      When calculate between date and interval.

      select timestamp '2019-01-01 00:00:00' + interval '1 2:03:04' day to second, timestamp '2019-01-01 00:00:00' + interval '-1 2:03:04' day to second
      
      • PostgreSQL return 2019-01-02 02:03:04    2018-12-31 02:03:04
      • SparkSQL return    2019-01-02 02:03:04    2018-12-30 21:56:56
      select timestamp '2019-01-01 00:00:00' + interval '1 -2:03:04' day to second, timestamp '2019-01-01 00:00:00' + interval '-1 -2:03:04' day to second
      
      • PostgreSQL return 2019-01-01 21:56:56    2018-12-30 21:56:56
      • SparkSQL return    Interval string does not match day-time format of 'd h:m:s.n': '1 -2:03:04'(line 1, pos 50)

      Attachments

        Activity

          People

            Unassigned Unassigned
            lipzhu Zhu, Lipeng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: