Ted-Jiang commented on code in PR #2158:
URL: https://github.com/apache/arrow-rs/pull/2158#discussion_r928559983
##########
parquet/src/arrow/record_reader/mod.rs:
##########
@@ -184,11 +185,24 @@ where
/// # Returns
///
/// Number of records skipped
- pub fn skip_records(&mut self, num_records: usize) -> Result<usize> {
+ pub fn skip_records(
+ &mut self,
+ num_records: usize,
+ pages: &mut dyn PageIterator,
+ ) -> Result<usize> {
// First need to clear the buffer
let end_of_column = match self.column_reader.as_mut() {
Some(reader) => !reader.has_next()?,
- None => return Ok(0),
+ None => {
+ // If we skip records before all read operation
+ // we need set `column_reader` by `set_page_reader`
+ if let Some(page_reader) = pages.next() {
Review Comment:
Fix skip before all read operator, need set column_reader
--
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]