hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghotham Murthy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-511) Change the hashcode for DoubleWritable
Date Sat, 23 May 2009 02:00:45 GMT

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

Raghotham Murthy commented on HIVE-511:
---------------------------------------

I dont think this change works well for longs with the code in UDFDefaultSampleHashFn since
we just call o.hashCode(). Long.hashCode() returns (int)(value ^ (value >>> 32))
which is not the same as what you are doing. Notice '>>>' instead of '>>'.
Also, maybe you want to change UDFDefaultSampleHashFn to use your hashCode method as well.

> Change the hashcode for DoubleWritable
> --------------------------------------
>
>                 Key: HIVE-511
>                 URL: https://issues.apache.org/jira/browse/HIVE-511
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Zheng Shao
>         Attachments: HIVE-511.1.patch
>
>
> The current DoubleWritable hashCode takes only the last 32 bits. This is a big problem
because for small integer values like 1.0, 2.0, 15.0, the hashCode are all 0.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message