Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-3504: UDF for current timestamp in UTC
......................................................................


Patch Set 6:

(6 comments)

Thanks for bearing with us, Youwei!

http://gerrit.cloudera.org:8080/#/c/4490/6/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

PS6, Line 4120: forward-lapsing time
forward-lapsing?


PS6, Line 4132: ut1, ut2;
can you name these to reference the values they're holding, e.g. unixtime_utc, 
unixtime_local?


PS6, Line 4136: const bool res1
This should be true unless there wasn't a value in the TimestampValue, which 
shouldn't happen here. You don't need to define res1/res2 and check after, just 
DCHECK(now_utc.ToUnixTime(...));


PS6, Line 4137: const bool res2
same


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

PS6, Line 843: boost::date_time::c_local_adjustor<ptime>::utc_to_local
I'd still vote to not bother with the conversion, but it seems fine.


PS6, Line 845:   const time_duration td_delta = universal_time - local_time;
             :   DCHECK(td_delta >= time_duration(-12, 0, 0) && td_delta <= 
time_duration(12, 0, 0));
I'm not sure we should check this. While this seems intuitive, there might be 
weird corner cases (e.g. leap seconds/minutes/whatever?). Who knows. I'm not 
sure we need to DCHECK this


-- 
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: 6
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