[Java] MurmurHasher doesn't take the final bytes into account if size % 4 != 0
- 主要语言
- Java
- 星标
- 94
- 派生
- 152
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 11
描述
Minimal test case: all buffers of size 1 currently hash to the same value (-1684229222)
To my (admittedly untrained) eye, it looks like should range from `length - 1` rather than `index - 1`?
Also, should the nearby `index += 1` be removed, so that `i` and `index` don't meet in the middle? (`index` is being checked in the loop condition)
**Reporter**: [James Henderson](https://issues.apache.org/jira/browse/ARROW-15175) / @jarohen
**Note**: *This issue was originally created as [ARROW-15175](https://issues.apache.org/jira/browse/ARROW-15175). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
贡献指南
调研方向
打开 java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/hash/MurmurHasher.java 中引用的行,并使用大小不能被四整除的缓冲区重现该问题,尤其是大小为 1 的缓冲区。跟踪循环边界和最后一个字节的处理,然后验证最后一个字节不同的缓冲区不再产生相同的哈希值。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- data
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100