[
https://issues.apache.org/jira/browse/HIVE-8745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14199292#comment-14199292
]
Jason Dere commented on HIVE-8745:
----------------------------------
Looks like HiveDecimal and HiveDecimalWritable have different comparison
semantics in their equals() methods.
For HiveDecimal, 1.1 != 1.10
For HIveDecimalWritable, 1.1 == 1.10
This is due to the fact that HiveDecimal.equals() uses BigDecimal.equals(),
where the precision/scale/value all need to be the same to be considered equal.
HiveDecimal probably should have been using BigDecimal.compareTo(), which is
what is used in HiveDecimalWritable.equals().
[~xuefuz], [~spena], would you agree with this?
> Joins on decimal keys return different results whether they are run as reduce
> join or map join
> ----------------------------------------------------------------------------------------------
>
> Key: HIVE-8745
> URL: https://issues.apache.org/jira/browse/HIVE-8745
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.14.0
> Reporter: Gunther Hagleitner
> Priority: Critical
> Attachments: join_test.q
>
>
> See attached .q file to reproduce. The difference seems to be whether
> trailing 0s are considered the same value or not.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)