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

date_trunc with MILLENNIUM returns 2000 instead of 2001

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Impala 3.0, Impala 2.12.0
    • Fix Version/s: Impala 2.12.0
    • Component/s: Backend
    • Labels:
    • Epic Color:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: