Michael Ho has posted comments on this change.

Change subject: IMPALA-4370: Divide and modulo result types for DECIMAL version 
V2
......................................................................


Patch Set 11: Code-Review+1

(6 comments)

http://gerrit.cloudera.org:8080/#/c/5952/11/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

PS11, Line 1293: we'll have both
the V2's entry will have


Line 1298:     // Either testing version 1, or the results for version 2 were 
not specified.
May want to DCHECK(!v2 || (!expected[1].null && expected[1].precision == 0));


PS11, Line 1365: static_cast<int128_t>(10) * 10000000000ll *
               :        10000000000ll * 10000000000ll
Feel free to ignore but you can consider using 
DecimalUtil::GetScaleMultiplier<int128_t>() here.


PS11, Line 1392:   { "cast(1 as decimal(38,0)) % cast(3 as decimal(38,0))",
               :     {{ false, 1, 38, 0 }} },
Can we also have some cases such as:

cast(x as DECIMAL(0,38)) % cast(y as DECIMAL(0,38))
cast(x as DECIMAL(0,38)) % cast(y as DECIMAL(38,0))
cast(x as DECIMAL(38,0)) % cast(y as DECIMAL(0,38))


http://gerrit.cloudera.org:8080/#/c/5952/11/be/src/runtime/decimal-value.inline.h
File be/src/runtime/decimal-value.inline.h:

PS11, Line 237: precision
scale


PS11, Line 239: confirm with standard that truncate is okay.
May help to rephrase this to state that we need to implement rounding for 
decimal_v2.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I83e7f7787edfa4b4bddc25945090542a0e90881b
Gerrit-PatchSet: 11
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dan Hecht <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Zach Amsden <[email protected]>
Gerrit-HasComments: Yes

Reply via email to