Attila Jeges has posted comments on this change. ( http://gerrit.cloudera.org:8080/8508 )
Change subject: IMPALA-5237: Support a quoted string in date/time format ...................................................................... Patch Set 2: (4 comments) http://gerrit.cloudera.org:8080/#/c/8508/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8508/2//COMMIT_MSG@9 PS2, Line 9: Impala does not represent a quoted string at date/time format. For example, Please wrap commit message lines at 70 characters (here and below). http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/exprs/expr-test.cc File be/src/exprs/expr-test.cc: http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/exprs/expr-test.cc@5747 PS2, Line 5747: '\\'day\\'dd,\\'month\\'MMM,\\'year\\'yyyy,\\'hour\\'HH,\\'minute\\'mm,\\'second\\'ss')", Please wrap lines at 90 characters. http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/runtime/timestamp-parse-util.h File be/src/runtime/timestamp-parse-util.h: http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/runtime/timestamp-parse-util.h@79 PS2, Line 79: // User can specify a quoted string at date/time format. For example, addtional quoted string Please wrap lines at 90 characters (here and below). http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/runtime/timestamp-parse-util.cc File be/src/runtime/timestamp-parse-util.cc: http://gerrit.cloudera.org:8080/#/c/8508/2/be/src/runtime/timestamp-parse-util.cc@170 PS2, Line 170: if (str - string_literal != 1) { : const int len = str - string_literal - 1; : DCHECK(len >= 0); : const int pos = str - str_begin - len; : DCHECK(pos >= 0); : const char* val = string_literal + 1; : dt_ctx->toks.push_back(DateTimeFormatToken(SEPARATOR, pos, len, val)); : } What if (str - string_literal == 1) ? Note, that in Hive you get an apostrophe: > select from_unixtime(1492677561, 'H\'\''); 10' -- To view, visit http://gerrit.cloudera.org:8080/8508 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie34055ac695748bcfb110bfa6ed5308f469ea178 Gerrit-Change-Number: 8508 Gerrit-PatchSet: 2 Gerrit-Owner: Kim Jin Chul <jinc...@gmail.com> Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com> Gerrit-Reviewer: Kim Jin Chul <jinc...@gmail.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Tue, 14 Nov 2017 18:22:23 +0000 Gerrit-HasComments: Yes