leerho commented on code in PR #675:
URL: https://github.com/apache/datasketches-java/pull/675#discussion_r2249348739


##########
src/main/java/org/apache/datasketches/hash/MurmurHash3.java:
##########
@@ -306,42 +308,34 @@ public static long[] hash(final byte[] key, final int 
offsetBytes, final int len
 
   //--Hash of ByteBuffer---------------------------------------------------
   /**
-   * Hash the remaining bytes of the given ByteBuffer starting at position().
+   * Hash the remaining bytes of the given ByteBuffer starting at position() 
ending at limit (exclusive).
    *
-   * @param buf The input ByteBuffer. It must be non-null and non-empty.
+   * @param buf The input ByteBuffer. It must be non-null and non-empty and 
using Little Endian.

Review Comment:
   I checked all the places in /main/ where BB is used as an import. And, as it 
turns out, in every one of those places the BB is only used as an import data 
item. It is never interpreted as a sketch or any kind of struct of data items. 
It is just treated as one glob of bytes, treated as a single item.  It just 
gets hashed as any other input item would be. Thus the endianness is 
irrelevant.  As for the case you pointed out, the comment is wrong, it doesn't 
have to be Little Endian.
   
   I also checked all the places the use java.util.ByteOrder.  These are all 
checking the state of the machine and could be centralized.  But I'll do that 
on another PR. They are harmless now.
   
   I will change the comment, and do the ByteOrder fix ups on a different PR.
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org
For additional commands, e-mail: dev-h...@datasketches.apache.org

Reply via email to