Zach Amsden has posted comments on this change.

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


Patch Set 3:

(2 comments)

Decimal is immune to this because the range is clamped.  Float and double are 
immune because there is a sign bit.

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. Ma
I tested this manually but didn't think the test was super useful.  Can add it 
anyway though (would protect against a bug which somehow reversed sign)


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 tra
Done


-- 
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 <zams...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Zach Amsden <zams...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to