[ 
https://issues.apache.org/jira/browse/IMPALA-15486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Efimov closed IMPALA-15486.
-------------------------------------
    Fix Version/s: Impala 5.0.0
       Resolution: Fixed

> Calcite planner: Fix DECIMAL return types for TRUNC and ROUND
> -------------------------------------------------------------
>
>                 Key: IMPALA-15486
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15486
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Aleksandr Efimov
>            Assignee: Aleksandr Efimov
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> For DECIMAL(15,3) with scale 2, Calcite returns DECIMAL(15,2) for TRUNC and 
> DECIMAL(16,2) for ROUND, instead of DECIMAL(14,2) and DECIMAL(15,2). Clamp 
> result scale and derive precision from the remaining digits, adding a carry 
> digit only when rounding reduces scale. Use minimum precision 1 where native 
> truncation reports DECIMAL(0,0). Cover all five aliases; leave non-decimal 
> inference unchanged.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to