Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.10.0, 0.11.0, 0.12.0
-
None
-
None
Description
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:
hive> select 2147483640 + 2147483645 from tmp2 limit 1; ... OK -11 Time taken: 6.549 seconds, Fetched: 1 row(s)
To be consistent in terms of error handling, Hive should produce NULL value instead.