Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`UnionListReader.setPosition` throws IOOBE on a post-IPC empty List

オープン
#1,125 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java
領域
data

調査の方向性

UnionListReader.setPosition から始め、SingleStructReaderImpl.reader(String) からの呼び出しを追跡します。Issue で説明されている関連する UnionMapReader と UnionLargeListReader のパスと比較します。IPC 後の空のリストのケースを再現し、その後、offset または capacity が空であるか想定より短い場合でも、これらの reader が IndexOutOfBoundsException をスローしなくなっていることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Type: bug
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) calls setPosition(idx()) the first time a child reader on a struct is looked up.
  • UnionMapReader inherits from UnionListReader and breaks the same way.
  • UnionLargeListReader has a related variant; capacity guard seems to be missing and it fails whenever the offset buffer is shorter than (idx + 2) * 8 bytes.

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/arrow-java のほかの issue

apache/arrow-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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