apache / apache/arrow-java

[Java] MurmurHasher doesn't take the final bytes into account if size % 4 != 0

オープン
#248 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
Type: bug
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。