Paul-Folbrecht opened a new issue, #7132:
URL: https://github.com/apache/arrow-rs/issues/7132
Your sample:
```
#[derive(ParquetRecordReader)]
struct ACompleteRecord {
pub a_bool: bool,
pub a_string: String,
}
pub fn read_some_records() -> Vec<ACompleteRecord> {
let mut samples: Vec<ACompleteRecord> = Vec::new();
let file = File::open("some_file.parquet").unwrap();
let reader = SerializedFileReader::new(file).unwrap();
let mut row_group = reader.get_row_group(0).unwrap();
samples.read_from_row_group(&mut *row_group, 1).unwrap();
samples
}
```
The
[docs](https://arrow.apache.org/rust/parquet/record/trait.RecordReader.html#tymethod.read_from_row_group)
state
"Read up to num_records records from row_group_reader into self."
But if you pass more than the number of rows in the file, you get an error
like
```
thread 'parquet_reader::test_read_records' panicked at
services/src/parquet_reader.rs:10:10:
index out of bounds: the len is 66945 but the index is 66945
```
Since there's no way to determine the number of rows without iterating once,
this is a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]