Hello Tim Armstrong,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/3138
to look at the new patch set (#2).
Change subject: IMPALA-3439: Only convert decimal literals in
convertNumericLiteralsFromDecimal().
......................................................................
IMPALA-3439: Only convert decimal literals in
convertNumericLiteralsFromDecimal().
Numeric literals with a decimal point are typed as DECIMAL, if possible. Since
decimals have a higher processing cost than FLOAT/DOUBLE we have special casting
rules to convert DECIMAL operations to DOUBLE in certain reasonable
circumstances.
The bug was that in this conversion process we used to blindly replace all
numeric
literals with DOUBLE. The blind conversion caused expressions to fail analysis
after the substitution if they did not have a matching DOUBLE signature.
For example, round() requies the second argument to be an integer, and does
not have a signature with DOUBLE as the second argument.
The fix is to only replace DECIMAL literals with DOUBLE.
Based on the comments in the relevant parts of the code, this new behavior
matches
the original intent more cleanly/directly.
Testing: I did a private core/hdfs run and local testing.
Change-Id: I33f319b00a8fef3a81418d6c7ac030b002c5d0d1
---
M fe/src/main/java/com/cloudera/impala/analysis/Expr.java
M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeExprsTest.java
2 files changed, 10 insertions(+), 6 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/38/3138/2
--
To view, visit http://gerrit.cloudera.org:8080/3138
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I33f319b00a8fef3a81418d6c7ac030b002c5d0d1
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.6.0_5.8.0
Gerrit-Owner: Alex Behm <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>