hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dere (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8745) Joins on decimal keys return different results whether they are run as reduce join or map join
Date Thu, 06 Nov 2014 07:46:34 GMT

    [ https://issues.apache.org/jira/browse/HIVE-8745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14199960#comment-14199960
] 

Jason Dere commented on HIVE-8745:
----------------------------------

{quote}
If the serde needs to remove trailing zeros during serialization, this is fine as long as
it can get them back upon deserialization.
{quote}

What I'm saying is I don't think it's possible to get the trailing zeros back upon deserialization.
Since this is BinarySortableSerde, the comparison is based on the bytes representing the decimal
value.  If we had a way to differentiate 1.0 from 1.00 during deserialization, then there
would have to be something in the BinarySortable representation of the decimal value to specify
one trailing zero vs two trailing zeros, which would make the bytes comparison fail between
1.0 and 1.00. So the trailing zeros would be permanently trimmed.

> 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
>            Assignee: Jason Dere
>            Priority: Critical
>             Fix For: 0.14.0
>
>         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)

Mime
View raw message