apache / apache/arrow-java

ListVector#getBuffers returns buffers in the wrong order for usage of VectorLoader

Aperta
#341 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Type: bug
Lingua principale
Java
Stelle
94
Fork
152
Merge medio
3g 16h
PR unite (30g)
11

Descrizione

Calling [getBuffers](https://github.com/apache/arrow/blob/06ca00c2daeeb0d6461e7b6bec51679c19b5b92b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java#L652-L653) on a ListVector adds the offsetBuffers first and the validityBuffer second. When a ListVector is populated by [loadFieldBuffers](https://github.com/apache/arrow/blob/06ca00c2daeeb0d6461e7b6bec51679c19b5b92b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java#L183-L189) (e.g. via a VectorLoader), the validityBuffer is read first and the offsetBuffer is read second. The resulting vector represents different data than the originating vector.

**Reporter**: [Paul Horn](https://issues.apache.org/jira/browse/ARROW-16377)

**Note**: *This issue was originally created as [ARROW-16377](https://issues.apache.org/jira/browse/ARROW-16377). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java, leggendo insieme getBuffers e loadFieldBuffers, quindi segui il modo in cui VectorLoader utilizza i buffer. Il lavoro è completato quando un ListVector serializzato da getBuffers e caricato tramite loadFieldBuffers rappresenta gli stessi dati, con i buffer di validità e degli offset gestiti in modo coerente.

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

Valutazione

Stack tecnologico
java
Ambito
data
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.