impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5237: support custom string in date/time format
Date Thu, 09 Nov 2017 01:40:36 GMT
Tim Armstrong has posted comments on this change. ( )

Change subject: IMPALA-5237: support custom string in date/time format

Patch Set 1:


This is cool!
File be/src/exprs/
PS1, Line 5724:   TestValue("unix_timestamp('1970|01|01 00|00|00', 'yyyy|MM|dd HH|mm|ss')",
I think we also need to add tests for parsing with format strings including quoted text.
PS1, Line 5746:   TestError("from_unixtime(0, 'HHH\\'')");
Can you add a test for an unmatched '\. Or if one of the above tests covers that case, can
you add a comment?
File be/src/runtime/timestamp-parse-util.h:
PS1, Line 77: /// The following features are not supported:
Can you update this comment to include an example of the feature you added?
File be/src/runtime/
PS1, Line 160:     if ('\'' == *str) {
nit: *str == '\'' to match the convention below
PS1, Line 161: comment_begin
maybe 'string_literal' instead of 'comment'?
PS1, Line 162:       do {
Can you add a comment here explaining that we're matching a string literal, and maybe give
an example of the input that it's matching.
PS1, Line 164:         // Meet end of string
This comment isn't to informative. Maybe:

  // Hit end of string before finding a matching quote.
PS1, Line 165:         if (str == str_end) {
Nit: 1 line:

  if (str == str_end) return false;
PS1, Line 168:       } while ('\'' != *str);
nit: *str != '\'' to match the convention below

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie34055ac695748bcfb110bfa6ed5308f469ea178
Gerrit-Change-Number: 8508
Gerrit-PatchSet: 1
Gerrit-Owner: Kim Jin Chul <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Comment-Date: Thu, 09 Nov 2017 01:40:36 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message