Hello Aman Sinha, Steve Carlin, Michael Smith, Joe McDonnell, Impala Public
Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/25024
to look at the new patch set (#5).
Change subject: IMPALA-15486: Fix DECIMAL scale result types
......................................................................
IMPALA-15486: Fix DECIMAL scale result types
Clamp Calcite DECIMAL scale to the input scale and zero, and derive
precision from the remaining digits. Use minimum precision 1 for
fractional-only truncation. Leave non-decimal inference unchanged.
Preserve the requested scale when deciding whether ROUND/DROUND can
carry, including negative scales on integer decimals. Apply this rule
to both planners and cap the result precision at 38.
Add shared SQL regressions and FE metadata and value checks.
Testing: nine focused FE tests, including 66 rounding type/value checks
across Original DECIMAL V1/V2 and Calcite V2. Both planner baselines fail
the new regression. Shared QueryTest parsing passed.
Change-Id: I8f6e6e2eaa7fe6eeab88b4143ed6b73e65220333
Assisted-by: gpt-6.1-sol
---
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaAdjustScaleFunction.java
A
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteDecimalScaleTest.java
A testdata/workloads/functional-query/queries/QueryTest/decimal-scale.test
M tests/query_test/test_exprs.py
5 files changed, 357 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/24/25024/5
--
To view, visit https://gerrit.cloudera.org/25024
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8f6e6e2eaa7fe6eeab88b4143ed6b73e65220333
Gerrit-Change-Number: 25024
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>