manolama opened a new issue, #38366:
URL: https://github.com/apache/arrow/issues/38366
### Describe the bug, including details regarding any error messages,
version, and platform.
When attempting to use the `MurmurHasher` for values like `foo` and `bar`,
the same hash was produced.
Reproduction:
```
@Test
public void testHasherLessThanInt() {
try (ArrowBuf buf1 = allocator.buffer(4);
ArrowBuf buf2 = allocator.buffer(4)) {
buf1.writeBytes("foo1".getBytes(StandardCharsets.UTF_8));
buf2.writeBytes("bar2".getBytes(StandardCharsets.UTF_8));
for (int i = 1; i <= 4; i ++) {
verifyHashCodeNotEqual(buf1, 0, i, buf2, 0, i);
}
}
}
private void verifyHashCodeNotEqual(ArrowBuf buf1, int offset1, int
length1,
ArrowBuf buf2, int offset2, int
length2) {
int hashCode1 = hasher.hashCode(buf1, 0, length1);
int hashCode2 = hasher.hashCode(buf2, 0, length2);
System.out.println(hashCode1 + " != " + hashCode2);
//assertNotEquals(hashCode1, hashCode2);
}
```
produces
```
-1684229222 != -1684229222
-26109336 != -26109336
-235476567 != -235476567
779730367 != 296486961
```
### Component(s)
Java
--
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]