Vincent Tran has posted comments on this change. Change subject: IMPALA-5315 Cast to timestamp fails for YYYY-M-D format ......................................................................
Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/exprs/expr-test.cc File be/src/exprs/expr-test.cc: Line 2216: TimestampValue::Parse("2001-01-21 00:00:00")); > Should this also work for lazy years? If not, please add a test to make sur Done Line 2217: > What about timestamps with a time, like "2012-1-1 09:10:11"? Should we pars You're right as that will likely require a rewrite of the parser to handle lazy date and time more intelligently. Though, I wasn't planning to do that here. Added negative tests to make sure all of these cases don't parse. http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/runtime/timestamp-parse-util.h File be/src/runtime/timestamp-parse-util.h: Line 217: static const int DEFAULT_LAZY_SINGLE_DATE_FMT_LEN = 8; > single and double are often used for floating point precision. Can you thin Done Line 233: static DateTimeFormatContext DEFAULT_LAZY_SINGLE_DATE_CTX; > same here Done -- To view, visit http://gerrit.cloudera.org:8080/7009 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Vincent Tran <vtt...@cloudera.com> Gerrit-Reviewer: Lars Volker <l...@cloudera.com> Gerrit-Reviewer: Vincent Tran <vtt...@cloudera.com> Gerrit-HasComments: Yes