[Java] MurmurHasher doesn't take the final bytes into account if size % 4 != 0
- 主要言語
- Java
- スター
- 94
- フォーク
- 152
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 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 を開き、サイズが4で割り切れないバッファ、特にサイズ1のバッファで問題を再現してください。ループの範囲と最後のバイトの処理を追跡し、その後、最後のバイトが異なるバッファが同じハッシュを生成しなくなったことを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- data
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100