impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoram Thanga (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5599: Fix for mis-use of TimestampValue
Date Thu, 21 Sep 2017 23:05:46 GMT
Zoram Thanga has posted comments on this change. ( http://gerrit.cloudera.org:8080/8084 )

Change subject: IMPALA-5599: Fix for mis-use of TimestampValue
......................................................................


Patch Set 3:

(5 comments)

Have added the new unit test, and also made a minor fix with respect to handling negative
times (times older than the Unix epoch).

http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.h
File be/src/util/time.h:

http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.h@79
PS3, Line 79: ,
> maybe add: 's'
Done


http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.h@80
PS3, Line 80: strin
> string
Done


http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.h@81
PS3, Line 81: form
> format
Done


http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.cc
File be/src/util/time.cc:

http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.cc@33
PS3, Line 33: time zone specified by the boolean argument 'utc'
> since 'utc' doesn't tell you the other time zone, how about:
Done


http://gerrit.cloudera.org:8080/#/c/8084/3/be/src/util/time.cc@75
PS3, Line 75: // Convert time point 't' into date-time string at precision 'p' in the local
            : // time zone.
            : static string ToString(const chrono::system_clock::time_point& t, TimePrecision
p)
            : {
            :   stringstream ss;
            :   ss << TimepointToString(t, false);
            :   ss << FormatSubSecond(t, p);
            :   return ss.str();
            : }
            : 
            : // Convert time point 't' into date-time string at precision 'p' in the UTC
            : // time zone.
            : static string ToUtcString(const chrono::system_clock::time_point& t, TimePrecision
p)
            : {
            :   stringstream ss;
            :   ss << TimepointToString(t, true);
            :   ss << FormatSubSecond(t, p);
            :   return ss.str();
            : }
> up to you, but you could combine these into a single ToString() function th
Done - combined into a single function that takes a 'bool utc' argument.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9b0ae06f6d94968c87a199625aa3332b26988142
Gerrit-Change-Number: 8084
Gerrit-PatchSet: 3
Gerrit-Owner: Zoram Thanga <zoram@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mjacobs@apache.org>
Gerrit-Reviewer: Zoram Thanga <zoram@cloudera.com>
Gerrit-Comment-Date: Thu, 21 Sep 2017 23:05:46 +0000
Gerrit-HasComments: Yes

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