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 "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/03/25 22:30:00 UTC

[jira] [Commented] (IMPALA-7260) Query with decimal binary predicate needlessly fails

    [ https://issues.apache.org/jira/browse/IMPALA-7260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801188#comment-16801188 ] 

ASF subversion and git services commented on IMPALA-7260:
---------------------------------------------------------

Commit 9e27a297641b6031239a4cbda525f30566864f26 in impala's branch refs/heads/2.x from Taras Bobrovytsky
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9e27a29 ]

IMPALA-7260: Fix decimal binary predicates

When casting the inputs to a function call, we would try to cast non
decimal numbers to a specific decimal type even though this is not
necessary. The specific decimal type would be calculated by looking at
all the inputs. It was possible for this calculation to fail due to some
decimal types being incompatible with each other.

We solve the problem by casting the non-decimal numerical inputs to a
generic getMinResolutionDecimal().

Testing:
- Added some analysis tests.

Change-Id: Icc442e84cdff74a376ba25bd9897b0b4df5cf0b4
Reviewed-on: http://gerrit.cloudera.org:8080/10888
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Query with decimal binary predicate needlessly fails
> ----------------------------------------------------
>
>                 Key: IMPALA-7260
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7260
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0
>            Reporter: Taras Bobrovytsky
>            Assignee: Taras Bobrovytsky
>            Priority: Major
>             Fix For: Impala 3.1.0
>
>
> The following query results in a error
> {code}select cast(1 as decimal(38,37)) <= cast(2 as bigint){code}
> Error:
> {code}
> ERROR: IllegalStateException: null
> {code}



--
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