[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