`UnionListReader.setPosition` throws IOOBE on a post-IPC empty List
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 67/100
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
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
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/arrow-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/arrow-java#1261 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/arrow-java#1236 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/arrow-java#1230 ·
-
Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
apache/arrow-java#1205 ·
-
Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/arrow-java#1196 · 1 commento ·
Tutte le issue di apache/arrow-java
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Apertabug frontend maui-pilot
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
objectionary/eo-graphs#74 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100