Attila Jeges has uploaded a new patch set (#2). ( 
http://gerrit.cloudera.org:8080/9508 )

Change subject: IMPALA-6606: date_trunc() misinterprets MILLENNIUM/CENTURY 
precision
......................................................................

IMPALA-6606: date_trunc() misinterprets MILLENNIUM/CENTURY precision

This change fixes the following correctness bug: date_trunc() function
returns the wrong result when truncating a TIMESTAMP value to
'MILLENNIUM' precision. E.g.:

select now(), date_trunc('millennium', now());
+-------------------------------+---------------------------------+
| now()                         | date_trunc('millennium', now()) |
+-------------------------------+---------------------------------+
| 2017-12-05 14:00:30.296812000 | 2000-01-01 00:00:00             |
+-------------------------------+---------------------------------+

The first year of the current millennium should be 2001.

'CENTURY' precision has the same issue.

Change-Id: I4f4aac17875dbf17dcabff25473ffeb006fce20b
---
M be/src/exprs/expr-test.cc
M be/src/exprs/udf-builtins.cc
2 files changed, 43 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/08/9508/2
--
To view, visit http://gerrit.cloudera.org:8080/9508
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4f4aac17875dbf17dcabff25473ffeb006fce20b
Gerrit-Change-Number: 9508
Gerrit-PatchSet: 2
Gerrit-Owner: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to