impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4513: Promote integer types for ABS()
Date Fri, 08 Sep 2017 16:18:04 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4513: Promote integer types for ABS()
......................................................................


Patch Set 3:

(2 comments)

Looks good to me modulo a couple of minor tweaks.

The same bug can't apply to decimal, right? Because there's no asymmetry with the upper and
lower bounds of the type.

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

Line 4215:   TestValue("abs(-127)", TYPE_SMALLINT, 127);
It looks like we don't have other coverage for abs integral expressions. Maybe add test cases
for the maximum positive inputs here too for good measure?


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

Line 70:       ctx->AddWarning("Expression overflowed, returning NULL");
Maybe "abs() overflowed, returning NULL" to make it easier for users to track down the problem.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I86cc880e78258d5f90471bd8af4caeb4305eed77
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <zamsden@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zamsden@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message