impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Bobrovytsky (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4848: Add WIDTH BUCKET() function
Date Tue, 10 Oct 2017 00:49:40 GMT
Taras Bobrovytsky has posted comments on this change. (

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

Patch Set 7:

(1 comment)
File be/src/exprs/
PS7, Line 516:   int256_t x = ConvertToInt256(buckets.value()) * ConvertToInt256(width_size.value());
> Sure, that's true. I don't think that this function is meant to be used tha
This idea may give a nice performance boost (if it works) because all the heavy lifting (such
as dividing and maybe converting to int256) is done once at the beginning when we are constructing
the array. The array will contain values that have the same precision and scale as the input
expression so all we have to do is O(log(number of buckets)) comparisons of expr to array
elements in case of binary search. Or O(number of buckets) comparisons if number of buckets
is small.

If number of buckets is very large, we can fall back to the current implementation. (we can
have 2 versions WidthBucketImpl such as WidthBucketImplSmall WidthBucketImplLarge)

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I081bc916b1bef7b929ca161a9aade3b54c6b858f
Gerrit-Change-Number: 6023
Gerrit-PatchSet: 7
Gerrit-Owner: anujphadke <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Michael Brown <>
Gerrit-Reviewer: Taras Bobrovytsky <>
Gerrit-Reviewer: anujphadke <>
Gerrit-Comment-Date: Tue, 10 Oct 2017 00:49:40 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message