You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (JIRA)" <ji...@apache.org> on 2019/04/25 06:38:00 UTC
[jira] [Updated] (IMPALA-7211) Query with a decimal between
predicate needlessly fails
[ https://issues.apache.org/jira/browse/IMPALA-7211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Quanlong Huang updated IMPALA-7211:
-----------------------------------
Fix Version/s: Impala 2.13.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 2.13.0, 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-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org