Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-3504: function for current timestamp in UTC, i.e. 
utc_timestamp()
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4490/3/be/src/service/impala-server.cc
File be/src/service/impala-server.cc:

PS3, Line 842:   typedef boost::date_time::c_local_adjustor<ptime> local_adj;
             :   const ptime& utime = 
boost::posix_time::microsec_clock::universal_time();
             :   const ptime& ltime = local_adj::utc_to_local(utime);
             :   
query_ctx->__set_now_string(TimestampValue(ltime).DebugString());
             :   
query_ctx->__set_now_utc_string(TimestampValue(utime).DebugString());
> As a user, I would be surprised if now() and utc_timestamp() were off by 8 
I don't think it matters since (AFAIK) the functions don't both promise to be 
at some specific point in time. Some docs say "the current date and time", 
whatever that means. If it were free and they were exactly the same, that'd be 
great, but I'd vote for less complexity. Are we even confident the conversion 
will result in it being the exact X hrs offset anyway? I don't trust any 
functions related to timestamps/timezones, etc., so IMO less 
touching/converting is more :)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ee6ee192aa469f77c711f27ad324696a42004d1
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Youwei Wang <youwei.a.w...@intel.com>
Gerrit-Reviewer: Jim Apple <jbap...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com>
Gerrit-Reviewer: Youwei Wang <youwei.a.w...@intel.com>
Gerrit-HasComments: Yes

Reply via email to