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

Taras Bobrovytsky resolved IMPALA-7211.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 3.1.0

> Query with a decimal between predicate needlessly fails
> -------------------------------------------------------
>
>                 Key: IMPALA-7211
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7211
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0
>            Reporter: Taras Bobrovytsky
>            Assignee: Taras Bobrovytsky
>            Priority: Critical
>              Labels: regression
>             Fix For: Impala 3.1.0
>
>
> The following query causes an analysis exception because decimal(38,2) and 
> decimal(38,3) are not compatible, i.e. it is not possible to cast them to the 
> same decimal type without losing information.
> {code}
> select cast(1 as decimal(38,2)) between 0.9 * cast(1 as decimal(38,3)) and 3
> {code}
> However, if we rewrite the between predicate, it succeeds.
> {code}
> select cast(1 as decimal(38,2)) >= 0.9*cast(1 as decimal(38,3)) and cast(1 as 
> decimal(38,2)) <= 3
> {code}
> Both queries should execute successfully.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to