impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IMPALA-985) An incorrect specification of a Decimal datatype should spit out a meaningful error message.
Date Sat, 17 Jun 2017 05:54:02 GMT

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

Tim Armstrong resolved IMPALA-985.
----------------------------------
    Resolution: Won't Fix

At this point it's not worth the additional complexity in the parser to fix this.

> An incorrect specification of a Decimal datatype should spit out a meaningful error message.
> --------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-985
>                 URL: https://issues.apache.org/jira/browse/IMPALA-985
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 1.4
>            Reporter: Ishaan Joshi
>            Priority: Minor
>              Labels: decimal, newbie
>
> Proper Error:
> {noformat}
> [localhost:21000] > select cast(0.1 as Decimal(2,3));
> Query: select cast(0.1 as Decimal(2,3))
> ERROR: AnalysisException: Decimal scale (3) must be <= precision (2).
> {noformat}
> However, this is not consistently applied:
> {noformat}
> [localhost:21000] > select cast(0.1 as Decimal(2,-2));
> Query: select cast(0.1 as Decimal(2,-2))
> ERROR: AnalysisException: Syntax error in line 1:
> select cast(0.1 as Decimal(2,-2))
>                              ^
> Encountered: -
> Expected
> CAUSED BY: Exception: Syntax error
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message