tustvold commented on code in PR #2158:
URL: https://github.com/apache/arrow-rs/pull/2158#discussion_r930055371
##########
parquet/src/column/reader.rs:
##########
@@ -312,13 +312,20 @@ where
// If page has less rows than the remaining records to
// be skipped, skip entire page
- if metadata.num_rows < remaining {
+ while metadata.num_rows < remaining {
self.page_reader.skip_next_page()?;
remaining -= metadata.num_rows;
- continue;
+ metadata = match self.page_reader.peek_next_page()? {
+ None => return Ok(num_records - remaining),
+ Some(metadata) => metadata,
+ };
}
+ // because self.num_buffered_values == self.num_decoded_values
means
+ // we need reads a new page and set up the decoders for levels
+ self.read_new_page()?;
Review Comment:
I'm confused why this is necessary. The first thing `read_batch` does is
call `has_next` which will call `read_new_page` if `self.num_buffered_values ==
self.num_decoded_values`?
--
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]