Hello Aman Sinha, Joe McDonnell, Michael Smith, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/22086

to look at the new patch set (#5).

Change subject: IMPALA-13523: Decimal Precision needs to be in return type
......................................................................

IMPALA-13523: Decimal Precision needs to be in return type

The Inferred return type needs to contain a decimal precision
and scale. The return type is calculated by taking the most
compatible type of all the arguments

One query in the e2e tests that will be fixed because of this
is:

select appx_median(c1), appx_median(c2), appx_median(c3)
from decimal_tiny;

The CoerceOperandShuttle also ensures that if the return type
is a decimal in certain cases, all the arguments for the function
will be cast to that specific return type.  The 2 cases here
are:
1) when the function is a case statement, in which all cases need
to be the same precision and scale
2) when the function contains varargs, in which case all the comparisons
need to be of the same precision and scale.

Change-Id: Ie10521b587a74930a01c08b711364f897bb2dc33
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceOperandShuttle.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/CommonOperatorFunctions.java
M testdata/workloads/functional-query/queries/QueryTest/exprs.test
3 files changed, 67 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/22086/5
--
To view, visit http://gerrit.cloudera.org:8080/22086
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie10521b587a74930a01c08b711364f897bb2dc33
Gerrit-Change-Number: 22086
Gerrit-PatchSet: 5
Gerrit-Owner: Steve Carlin <[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]>

Reply via email to