Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5660

Hive incorrecly handles data overflow/underflow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.0, 0.11.0, 0.12.0
    • None
    • Types
    • 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.

      Attachments

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              xuefuz Xuefu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: