Xuefu Zhang created HIVE-5660:
---------------------------------
Summary: Hive incorrecly handles data overflow/underflow
Key: HIVE-5660
URL: https://issues.apache.org/jira/browse/HIVE-5660
Project: Hive
Issue Type: Bug
Components: Types
Affects Versions: 0.12.0, 0.11.0, 0.10.0
Reporter: Xuefu Zhang
Assignee: Xuefu Zhang
Unlike other databases, Hive has only one server mode w.r.t error handling, in
which NULL value is placed in case of errors such as divide-by-zero and data
overflow/underflow. However, it appears that hive isn't consistent in this
prospect. In case of data overflow or underflow, Hive returns a value that
wraps around, which can produce erroneous result without user noticing it. For
instance:
{code}
hive> select 2147483640 + 2147483645 from tmp2 limit 1;
...
OK
-11
Time taken: 6.549 seconds, Fetched: 1 row(s)
{code}
To be consistent in terms of error handling, Hive should produce NULL value
instead.
--
This message was sent by Atlassian JIRA
(v6.1#6144)