impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anujphadke (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4848: Add WIDHT BUCKET() function
Date Wed, 22 Feb 2017 21:59:13 GMT
anujphadke has posted comments on this change.

Change subject: IMPALA-4848: Add WIDHT_BUCKET() function
......................................................................


Patch Set 2:

(7 comments)

Please review this change after  I push a new patch which addresses some overflow bugs.

http://gerrit.cloudera.org:8080/#/c/6023/1/be/src/exprs/math-functions-ir.cc
File be/src/exprs/math-functions-ir.cc:

Line 427:     const IntVal& num_buckets) {
> do all null checks in one if
Done


Line 429:     return IntVal::null();
> use min_range.val directly because the == operator will check for null agai
Done


Line 430:   }
> Lower...
Done


Line 434:   }
> should -> must
Done


http://gerrit.cloudera.org:8080/#/c/6023/2/be/src/exprs/math-functions-ir.cc
File be/src/exprs/math-functions-ir.cc:

Line 455:   double bucket_width = (max_range.val - min_range.val) / num_buckets.val;
This can overflow. Working on handling this.
select width_bucket(1.5e+200, -1.7e+308, 1.2e+308, 900);


Line 457:   int64_t result = static_cast<int64_t>((expr.val - min_range.val) / bucket_width)
+ 1;
This can overflow. Working on handling this.


http://gerrit.cloudera.org:8080/#/c/6023/1/be/src/exprs/math-functions.h
File be/src/exprs/math-functions.h:

Line 128:   /// Returns true if no parse_res == PARSE_SUCCESS || parse_res == PARSE_OVERFLOW.
> Move in the public section like the other functions.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I081bc916b1bef7b929ca161a9aade3b54c6b858f
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <aphadke@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: anujphadke <aphadke@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message