Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4498: crash in to_utc_timestamp/from_utc_timestamp
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/5251/4/be/src/exprs/timestamp-functions.cc
File be/src/exprs/timestamp-functions.cc:

Line 54: void ThrowExceptionIfTimestampOutOfRange(const boost::gregorian::date& 
date) {
> why not catch the exception here and return a status (with the error messag
We need to catch exceptions anyway in the caller anyway, since other boost 
timestamp functions can throw them. So adding a status return path from here 
would just double the amount of error handling in the caller.


Line 76:   if (!ts_value.HasDateOrTime()) return TimestampVal::null();
> the purpose of this check was to ensure that you're dealing with a valid ti
The bug is that timezone conversion of an in-range date can result in an 
out-of-range date.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idc427b06ac33ec874a05cb98d01c00e970d3dde6
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <mar...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovyt...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to