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

Ning Zhang commented on HIVE-1629:
----------------------------------

+    long v = Double.doubleToLongBits(value);
+    return (int) (v ^ (v >>> 32));

won't this return 0 for all long values less than 2^32?

Search on the web and it seems the following 64 bit to 32 bit hash is a good one

http://www.cris.com/~ttwang/tech/inthash.htm

> Patch to fix hashCode method in DoubleWritable class
> ----------------------------------------------------
>
>                 Key: HIVE-1629
>                 URL: https://issues.apache.org/jira/browse/HIVE-1629
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Vaibhav Aggarwal
>         Attachments: HIVE-1629.patch
>
>
> A patch to fix the hashCode() method of DoubleWritable class of Hive.
> It prevents the HashMap (of type DoubleWritable) from behaving as LinkedList.

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

Reply via email to