hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (JIRA)" <>
Subject [jira] [Commented] (HIVE-2378) Warn user that precision is lost when bigint is implicitly cast to double.
Date Mon, 15 Aug 2011 23:37:29 GMT

] commented on HIVE-2378:

This is an automatically generated e-mail. To reply, visit:

Review request for hive and Siying Dong.


I added a check in the code for equality expressions (includes inequalities) with operands
of different types, that throws an error or logs a warning, depending on strict mode, if one
operand is a string or double and the other is a bigint.

This addresses bug HIVE-2378.


  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ 1157946 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/ 1157946

  trunk/ql/src/test/queries/clientnegative/compare_double_bigint.q PRE-CREATION 
  trunk/ql/src/test/queries/clientnegative/compare_string_bigint.q PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/compare_double_bigint.q.out PRE-CREATION 
  trunk/ql/src/test/results/clientnegative/compare_string_bigint.q.out PRE-CREATION 



I added two tests (one for strings and one for doubles) to record the issue.

I also verified the unit tests still run.



> Warn user that precision is lost when bigint is implicitly cast to double.
> --------------------------------------------------------------------------
>                 Key: HIVE-2378
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Kevin Wilfong
>            Assignee: Kevin Wilfong
> When a bigint is implicitly cast to a double (when a bigint is involved in an equality
expression with a string or double) precision may be lost, resulting in unexpected behavior.
 Until we fix the underlying issue we should throw an error in strict mode, and a warning
in nonstrict mode alerting the user about this.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message