anujphadke has posted comments on this change.

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


Patch Set 4:

(1 comment)

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

Line 476:   int256_t y = 
DecimalUtil::MultiplyByScale<int256_t>(ConvertToInt256(range_size.value()),
> The current approach seems fine, but let's avoid going to int256_t if we ca
Agree.
But I think we could overflow when performing the multiplication to evaluate x 
for both decimal8Value and decimal16Value (if x is not int256_t).

And since we are avoiding evaluating the scale and precision for the division,  
the numerator and the denominator have to be the same type(again int256_t)?
What do you think?


-- 
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: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Michael Brown <[email protected]>
Gerrit-Reviewer: anujphadke <[email protected]>
Gerrit-HasComments: Yes

Reply via email to