impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-2.6.0_5.8.0) IMPALA-3163: Fix Decimal to Timestamp casting
Date Tue, 24 May 2016 17:43:48 GMT
Dan Hecht has posted comments on this change.

Change subject: IMPALA-3163: Fix Decimal to Timestamp casting
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3154/3/be/src/exprs/decimal-operators-ir.cc
File be/src/exprs/decimal-operators-ir.cc:

Line 583: whole_pt
maybe rename this seconds, and rename fract_pt to nanoseconds, to make the constructor args
clearer?


Line 601: int128_t
We don't have a TimestampValue(int128_t, int128_t) constructor.  We know fract_pt value with
be less than 64-bits, but whole_pt might not, so when passing to int64_t, it gets silently
truncated. Please add a test case for when this truncation will happen (both positive and
negative) and we probably need a check here.  This may be one case where the range is different
compared to the old double implementation (without this check).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iabeea9f4ab4880b2f814408add63c77916e2dba9
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.6.0_5.8.0
Gerrit-Owner: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message