impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3504: UDF for current timestamp in UTC
Date Sun, 25 Sep 2016 02:03:45 GMT
Matthew Jacobs has posted comments on this change.

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

Patch Set 6:


Thanks for bearing with us, Youwei!
File be/src/exprs/

PS6, Line 4120: forward-lapsing time

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
File be/src/service/

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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ee6ee192aa469f77c711f27ad324696a42004d1
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Youwei Wang <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Youwei Wang <>
Gerrit-HasComments: Yes

View raw message