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-4939, IMPALA-4939: Decimal V2 multiplication
Date Tue, 01 Aug 2017 18:48:47 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4939, IMPALA-4939: Decimal V2 multiplication

Patch Set 4:

Commit Message:

Line 7: IMPALA-4939, IMPALA-4939: Decimal V2 multiplication
The same JIRA is listed twice.

Line 75: DECIMAL_V2 disabled: 2.65s
This is scary and I don't think we should consider merging this until it's fixed (or we have
a strong reason why the regression is unavoidable and justified). Do we understand why the
int256_t is so much slower?
File be/src/runtime/decimal-value.inline.h:

Line 301:       // The following is frought with apparent difficulty, as there is only 1 bit
> Added a TODO.
It seems most efficient development-wise if we give this a try now while we're working on
and benchmarking this code instead of leaving a TODO.

This could be a big win - I know the div here is a big contributor to runtime for some queries,
e.g. TPC-H Q1
File be/src/util/bit-util.h:

Line 65:     return value < 0 ? -1 : 1;
> I included the benchmark result in the commit message.
Does it compile to the same assembly (or better assembly) as before? If it's adding a branch,
the benchmark may be misleading since the worst case would be a 50/50 mix of positive and
negative types, leading to branch mispredicts.

Another option is to keep the existing implementation and specialise the template for int256.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I37ad6232d7953bd75c18dc86e665b2b501a1ebe1
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Taras Bobrovytsky <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Reviewer: Zach Amsden <>
Gerrit-HasComments: Yes

View raw message