alamb commented on code in PR #7337:
URL: https://github.com/apache/arrow-rs/pull/7337#discussion_r2014869118
##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -682,13 +682,11 @@ struct ReaderPageIterator<T: ChunkReader> {
metadata: Arc<ParquetMetaData>,
}
-impl<T: ChunkReader + 'static> Iterator for ReaderPageIterator<T> {
- type Item = Result<Box<dyn PageReader>>;
-
- fn next(&mut self) -> Option<Self::Item> {
- let rg_idx = self.row_groups.next()?;
+impl<T: ChunkReader + 'static> ReaderPageIterator<T> {
Review Comment:
I moved the code that gets the next reader into its own function that
returns `Result<>` so that I could use `?` to check for errors. In the
`Iterator` implementation, returning `Option<Result<..>>` meant it was akward
to return the errors
--
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]