Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,125 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
data

Direzione di ricerca

Inizia da UnionListReader.setPosition e segui le chiamate da SingleStructReaderImpl.reader(String); confronta i percorsi correlati di UnionMapReader e UnionLargeListReader descritti nell’issue. Riproduci il caso di una lista vuota dopo IPC, quindi verifica che questi reader non generino più IndexOutOfBoundsException quando gli offset o la capacità sono vuoti o più corti del previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Java
Stelle
95
Fork
154
Merge medio
2g 10h
PR unite (30g)
11

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-java

Tutte le issue di apache/arrow-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.