parquet: `ParquetRecordBatchReaderBuilder::build` panics on an out-of-range row group index
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 20/100
Direzione di ricerca
The panic is in ReaderRowGroups::num_rows in parquet/src/arrow/arrow_reader/mod.rs; the linked pull request #12502 is already open. Read that method and the existing push decoder bounds check, then confirm build() returns the expected out-of-range error for the reproduction with one row group and index 1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
ParquetRecordBatchReaderBuilder::with_row_groups(...) followed by build() panics when an index is not a row group of the file. build() returns a Result, and the push decoder already reports this case as an error (Row group index 2 out of bounds for file with 2 row groups).
To Reproduce
use std::fs::File;
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
fn main() {
// one row group
let path = "parquet-testing/data/alltypes_plain.parquet";
let result = ParquetRecordBatchReaderBuilder::try_new(File::open(path).unwrap())
.unwrap()
.with_row_groups(vec![1])
.build();
println!("{:?}", result.map(|_| ()));
}
On 60.2.0 and on main (d470f2d54):
thread 'main' panicked at parquet/src/arrow/arrow_reader/mod.rs:1436:22:
index out of bounds: the len is 1 but the index is 1
Expected behavior
build() returns Err(General("Row group index 1 out of bounds for file with 1 row groups")), the message the push decoder and ParquetMetaData::row_group_num_rows use.
Additional context
The panic is in ReaderRowGroups::num_rows, which indexes the row group metadata with the caller's list.
ProjectionMask::leaves and ProjectionMask::roots also panic on an out-of-range index (parquet/src/arrow/mod.rs:303, :317). They return Self, so that is a separate question (a # Panics section, or ignoring the index); not part of this issue.
This report was prepared with AI assistance (Claude Code). The reproduction was run against 60.2.0 and main.
Willingness to contribute
I plan to contribute a fix for this bug independently
- Lingua principale
- Rust
- Stelle
- 3.7k
- Fork
- 1.5k
- Merge medio
- 2g 16h
- PR unite (30g)
- 183
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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-rs
-
parquet: `ArrowWriter::try_new` panics on a schema with a Union field instead of returning an errorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`RunArray::try_new` rejects run ends whose null buffer has no nullsForse già presa @Surajsuthar l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/arrow-rs#12427 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Variant] `variant_get` string and binary cast errors show Rust builder type namesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/arrow-rs
Issue simili
-
area:ui effort:medium enhancement P7 source:agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousApertamaintainer-needed p2 remote triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4605 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno