You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Taras Bobrovytsky (JIRA)" <ji...@apache.org> on 2018/01/17 01:54:02 UTC
[jira] [Created] (IMPALA-6405) There is no error under Decimal v2
when there is an overflow when casting String to Decimal
Taras Bobrovytsky created IMPALA-6405:
-----------------------------------------
Summary: There is no error under Decimal v2 when there is an overflow when casting String to Decimal
Key: IMPALA-6405
URL: https://issues.apache.org/jira/browse/IMPALA-6405
Project: IMPALA
Issue Type: Bug
Components: Backend
Affects Versions: Impala 2.11.0
Reporter: Taras Bobrovytsky
The following query correctly returns an error when Decimal v2 is enabled:
{code:java}
select cast(123 as decimal(2, 0));
ERROR: UDF ERROR: Decimal expression overflowed
{code}
However, this query incorrectly returns a NULL:
{code}
select cast("123" as decimal(2, 0))
+-----------------------------+
| cast('123' as decimal(2,0)) |
+-----------------------------+
| NULL |
+-----------------------------+
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)