[
https://issues.apache.org/jira/browse/HIVE-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086508#comment-13086508
]
[email protected] commented on HIVE-2378:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1515/#review1510
-----------------------------------------------------------
It's OK if you think it's equivalent. Just make sure you print to console's
error output stream, instead of Log.WARN
- Siying
On 2011-08-17 18:34:44, Kevin Wilfong wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/1515/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-08-17 18:34:44)
bq.
bq.
bq. Review request for hive and Siying Dong.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. 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.
bq.
bq.
bq. This addresses bug HIVE-2378.
bq. https://issues.apache.org/jira/browse/HIVE-2378
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 1158835
bq.
trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseCompare.java
1158835
bq. trunk/ql/src/test/queries/clientnegative/compare_double_bigint.q
PRE-CREATION
bq. trunk/ql/src/test/queries/clientnegative/compare_string_bigint.q
PRE-CREATION
bq. trunk/ql/src/test/results/clientnegative/compare_double_bigint.q.out
PRE-CREATION
bq. trunk/ql/src/test/results/clientnegative/compare_string_bigint.q.out
PRE-CREATION
bq.
bq. Diff: https://reviews.apache.org/r/1515/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. I added two tests (one for strings and one for doubles) to record the
issue.
bq.
bq. I also verified the unit tests still run.
bq.
bq.
bq. Thanks,
bq.
bq. Kevin
bq.
bq.
> Warn user that precision is lost when bigint is implicitly cast to double.
> --------------------------------------------------------------------------
>
> Key: HIVE-2378
> URL: https://issues.apache.org/jira/browse/HIVE-2378
> Project: Hive
> Issue Type: Improvement
> Reporter: Kevin Wilfong
> Assignee: Kevin Wilfong
> Attachments: HIVE-2378.1.patch.txt
>
>
> 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: http://www.atlassian.com/software/jira