Skip to content

Commit

Permalink
fix row count
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 22, 2023
1 parent 52d63d8 commit 975d6fb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl ParquetExec {
&self.predicate,
&mut self.file_options.with_columns.clone(),
&mut self.file_info.schema.clone(),
self.file_options.row_count.is_some(),
base_row_count.is_some(),
hive_partitions.as_deref(),
);

Expand Down Expand Up @@ -138,9 +138,8 @@ impl ParquetExec {
.collect::<PolarsResult<Vec<_>>>()
})?;

let n_read =
remaining_rows_to_read.saturating_sub(out.iter().map(|df| df.height()).sum());
remaining_rows_to_read = n_read;
let n_read = out.iter().map(|df| df.height()).sum();
remaining_rows_to_read = remaining_rows_to_read.saturating_sub(n_read);
if let Some(rc) = &mut base_row_count {
rc.offset += n_read as IdxSize;
}
Expand Down

0 comments on commit 975d6fb

Please sign in to comment.