Hello Arnab Karmakar, Steve Carlin, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/25025
to look at the new patch set (#3).
Change subject: IMPALA-15487: Fix DECIMAL truncation precision
......................................................................
IMPALA-15487: Fix DECIMAL truncation precision
Reserve one digit for zero when TRUNC, TRUNCATE or DTRUNC removes all
fractional digits in the Original planner. Preserve positive-scale
and ROUND/DROUND inference.
For example:
SELECT TRUNC(CAST(0.1 AS DECIMAL(1,1)));
Before the fix, this expression has type DECIMAL(0,0), which has no
digit to represent zero. After the fix, it has type DECIMAL(1,0).
Testing: one parameterized FE test covering 202 type/value checks
across DECIMAL V1/V2. The same test fails without the fix.
Change-Id: I1076caaf278038e37aa7c036dc87f4a81d89746c
Assisted-by: gpt-6.1-sol
---
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
2 files changed, 51 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/25/25025/3
--
To view, visit https://gerrit.cloudera.org/25025
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1076caaf278038e37aa7c036dc87f4a81d89746c
Gerrit-Change-Number: 25025
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>