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 "Paul Rogers (JIRA)" <ji...@apache.org> on 2019/03/01 18:17:00 UTC

[jira] [Assigned] (IMPALA-7898) LiteralExpr fails with class cast expression for some invalid DECIMAL values

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

Paul Rogers reassigned IMPALA-7898:
-----------------------------------

    Assignee:     (was: Paul Rogers)

> LiteralExpr fails with class cast expression for some invalid DECIMAL values
> ----------------------------------------------------------------------------
>
>                 Key: IMPALA-7898
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7898
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0
>            Reporter: Paul Rogers
>            Priority: Minor
>
> Suppose that we run this simple test:
> {code:java}
> LiteralExpr.create("123.1", ScalarType.createDecimalType(4, 2));
> {code}
> This method calls {{NumericLiteral.uncheckedCastTo()}} which will return a {{CastExpr}}. The code then casts this to a {{LiteralExpr}}, which will fail with a runtime {{ClassCastException}}.
> We should provide a clearer error message such as explaining that the value is invalid for the given type rather than just throwing a seemingly-unrelated exception.



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