Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9508 )

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


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/9508/1/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

http://gerrit.cloudera.org:8080/#/c/9508/1/be/src/exprs/expr-test.cc@8351
PS1, Line 8351:       TimestampValue::Parse("2110-01-01 00:00:00"));
> We could have some tests like that, but we would still have to test the "va
Yeah I guess there's a little bit of work to adapt the query syntax. Anyway, 
would be worth filing a JIRA to look into it.


http://gerrit.cloudera.org:8080/#/c/9508/2/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

http://gerrit.cloudera.org:8080/#/c/9508/2/be/src/exprs/expr-test.cc@6545
PS2, Line 6545:   TestValue("extract(cast('2006-05-12 18:27:28.12345' as 
timestamp), 'MoNTH')",
I also confirmed that we don't support MILLENNIUM/CENTURY/DECADE for extract


http://gerrit.cloudera.org:8080/#/c/9508/2/be/src/exprs/expr-test.cc@8350
PS2, Line 8350:   TestTimestampValue("date_trunc('DECADE', '2116-05-08 
10:30:00')",
I also checked DECADE against postgres


http://gerrit.cloudera.org:8080/#/c/9508/2/be/src/exprs/udf-builtins.cc
File be/src/exprs/udf-builtins.cc:

http://gerrit.cloudera.org:8080/#/c/9508/2/be/src/exprs/udf-builtins.cc@161
PS2, Line 161:   } else {
Can you add a comment that decades are considered to start with years ending in 
'0'? Otherwise it looks somewhat inconsistent.



--
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: comment
Gerrit-Change-Id: I4f4aac17875dbf17dcabff25473ffeb006fce20b
Gerrit-Change-Number: 9508
Gerrit-PatchSet: 1
Gerrit-Owner: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: 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>
Gerrit-Comment-Date: Tue, 06 Mar 2018 21:24:16 +0000
Gerrit-HasComments: Yes

Reply via email to