impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4433: Fix undefined NDV calculations
Date Tue, 08 Nov 2016 21:29:41 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4433: Fix undefined NDV calculations

Patch Set 1:

Commit Message:

Line 10: argument is 0. This patch handles that 0 case.
Might be good to mention that varies depending on the architecture.
File be/src/exprs/

Line 1175:   if (hash_value != 0) {
Same comment as the other place - I think we can remove this branch.
File be/src/udf_samples/

Line 75:   if (hash_value != 0) {
Let's remove this branch while we're at it. It doesn't make sense to me why it's there in
the first place and I don't think it's consequential (if you think about it, getting a hash
value of 0 should be extremely rare and not affect the final probabilistic result).

I wonder if the branch was originally an attempt to work around the problem you're fixing.

PS1, Line 81: hash_top_bits ? __builtin_ctzll(hash_top_bits) :
            :                              (sizeof(hash_value) * CHAR_BIT - HLL_PRECISION)
Can't we use the builtin you

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I8460bc3f7e510ce07b8673387c9440accc432abe
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <>
Gerrit-Reviewer: Amos Bird <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message