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 2018/11/27 01:14:00 UTC
[jira] [Created] (IMPALA-7898) LiteralExpr fails with class cast
expression for some invalid DECIMAL values
Paul Rogers created IMPALA-7898:
-----------------------------------
Summary: 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
Assignee: Paul Rogers
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