Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6606

date_trunc with MILLENNIUM returns 2000 instead of 2001

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 3.0, Impala 2.12.0
    • Impala 2.12.0
    • Backend
    • ghx-label-1

    Description

      This is incorrect and inconsistent with postgres.

      $ impala-shell.sh -q "select date_trunc('millennium', '2001-02-16 20:38:40');"
      +-------------------------------------------------+
      | date_trunc('millennium', '2001-02-16 20:38:40') |
      +-------------------------------------------------+
      | 2000-01-01 00:00:00                             |
      +-------------------------------------------------+
      Fetched 1 row(s) in 0.01s
      $ psql -c "select date_trunc('millennium', TIMESTAMP '2001-02-16 20:38:40');"
           date_trunc      
      ---------------------
       2001-01-01 00:00:00
      (1 row)
      

      Attachments

        Activity

          People

            attilaj Attila Jeges
            tarmstrong Tim Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: