[Java] ArrowRecordBatch Body Length Computation Only Accounts for Last Buffer
- Lingua principale
- Java
- Stelle
- 94
- Fork
- 152
- Merge medio
- 3g 16h
- PR unite (30g)
- 11
Descrizione
### Describe the bug, including details regarding any error messages, version, and platform.
Hi Arrow Community,
I believe `ArrowRecordBatch::computeBodyLength` has an implementation bug. It does the following
```
for (int i = 0; i < buffers.size(); i++) {
ArrowBuf buffer = buffers.get(i);
ArrowBuffer layout = buffersLayout.get(i);
size = layout.getOffset() + buffer.readableBytes();
// round up size to the next multiple of 8
size = DataSizeRoundingUtil.roundUpTo8Multiple(size);
}
return size;
```
Since `size` is being assigned and not incremented at first - does this mean computeBodyLength only accounts for the last buffer ?
### Component(s)
Java
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da ArrowRecordBatch::computeBodyLength e analizza in che modo i layout dei buffer e i byte leggibili contribuiscono al valore restituito. Riproduci il calcolo con più buffer, quindi controlla il codice Java circostante o i test per verificare la semantica prevista della lunghezza del body. Il lavoro è completato quando il calcolo tiene conto di ogni buffer e conserva l’arrotondamento richiesto a 8 byte.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data-engineering
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100