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

Change subject: IMPALA-5315: Cast to timestamp fails for YYYY-M-D format
......................................................................


Patch Set 14:

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/7009/14/be/src/exprs/expr-test.cc@3086
PS14, Line 3086:   TestIsNull("cast('1909-10-2 12:32:1.111.111.2' as 
timestamp)", TYPE_TIMESTAMP);
I spent some time trying to break the code. No luck yet. I realised we should 
systematically test invalid formats, to try and exercise all of the exit paths 
out of your function. Anyway, I stamped out some tests to convince myself of 
the correctness. I think we should add them to this patchset: 
https://github.com/timarmstrong/impala/tree/timestamp-parse-tests

I did find some interesting behaviour though with leading and trailing 
whitespace: IMPALA-6630. Can you add tests for that behaviour with the lazy and 
non-lazy formats to make sure we cover those code paths and don't accidentally 
break the current behaviour.



--
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-Change-Number: 7009
Gerrit-PatchSet: 14
Gerrit-Owner: Vincent Tran <vtt...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Vincent Tran <vtt...@cloudera.com>
Gerrit-Comment-Date: Fri, 09 Mar 2018 01:51:19 +0000
Gerrit-HasComments: Yes

Reply via email to