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 <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Zoram Thanga <[email protected]> Gerrit-Comment-Date: Thu, 21 Sep 2017 23:05:46 +0000 Gerrit-HasComments: Yes
