manolama commented on code in PR #38423:
URL: https://github.com/apache/arrow/pull/38423#discussion_r1385840032
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/hash/MurmurHasher.java:
##########
@@ -106,6 +111,36 @@ public static int hashCode(long address, long length, int
seed) {
return finalizeHashCode(hash, length);
}
+ /**
+ * Calculates the hash code for a byte array.
+ * @param buffer the non-null buffer to read.
+ * @param offset an offset into the byte array.
+ * @param length length of the memory region.
+ * @param seed the seed.
+ * @return the hash code.
+ */
+ public static int hashCode(byte[] buffer, int offset, int length, int seed) {
Review Comment:
This is for data that hasn't been written into an `ArrowBuf` via the
`Vector.set()` APIs yet. In the dictionary map we can hash the original data
and only copy it into an `ArrowBuf` if the hash wasn't present in the map.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]