`UnionListReader.setPosition` throws IOOBE on a post-IPC empty List
まだ誰も着手していません。
評価
調査の方向性
UnionListReader.setPosition から始め、SingleStructReaderImpl.reader(String) からの呼び出しを追跡します。Issue で説明されている関連する UnionMapReader と UnionLargeListReader のパスと比較します。IPC 後の空のリストのケースを再現し、その後、offset または capacity が空であるか想定より短い場合でも、これらの reader が IndexOutOfBoundsException をスローしなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug, including details regarding any error messages, version, and platform.
On 19.0.0 (and on master), calling setPosition on a ListVector that came off the wire via IPC with valueCount == 0 throws IndexOutOfBoundsException.
Some callers may hit this without touching setPosition themselves as
SingleStructReaderImpl.reader(String)callssetPosition(idx())the first time a child reader on a struct is looked up.UnionMapReaderinherits fromUnionListReaderand breaks the same way.UnionLargeListReaderhas a related variant; capacity guard seems to be missing and it fails whenever the offset buffer is shorter than(idx + 2) * 8bytes.
The reader code hasn't changed. ListVector.setReaderAndWriterIndex changes and now correctly emits the leading [0] offset when valueCount == 0 (as per the Arrow spec), so the receiver's offset buffer is no longer "zero-capacity" and if block capacity() == 0 never enters.
Repro
The shape we actually hit — a struct with a list-typed child, struct itself having valueCount == 0:
StructVector parent = ...; // child "l" is LIST<INT>, valueCount == 0
parent.getReader().reader("l"); // IOOBE
- 主要言語
- Java
- スター
- 95
- フォーク
- 154
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 11
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/arrow-java#1261 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/arrow-java#1236 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/arrow-java#1230 ·
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
apache/arrow-java#1205 ·
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/arrow-java#1196 · コメント 1 件 ·
apache/arrow-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·