Skip to content

Commit

Permalink
still truncate rows on globbed readers
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jan 7, 2022
1 parent 84c7a81 commit 76ff4be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions polars/polars-lazy/src/frame/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ impl<'a> LazyCsvReader<'a> {
let path_string = path.to_string_lossy().into_owned();
let mut builder = self.clone();
builder.path = path_string;
builder.skip_rows = 0;
builder.n_rows = None;
if builder.skip_rows > 0 {
builder.skip_rows = 0;
builder.n_rows = None;
}
// do no rechunk yet.
builder.rechunk = false;
builder.finish_impl()
Expand Down
2 changes: 0 additions & 2 deletions polars/polars-lazy/src/frame/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ impl LazyFrame {
.map(|r| {
let path = r.map_err(|e| PolarsError::ComputeError(format!("{}", e).into()))?;
let path_string = path.to_string_lossy().into_owned();
let mut args = args;
args.n_rows = None;
Self::scan_ipc_impl(path_string, args)
})
.collect::<Result<Vec<_>>>()?;
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/frame/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl LazyFrame {
.map(|r| {
let path = r.map_err(|e| PolarsError::ComputeError(format!("{}", e).into()))?;
let path_string = path.to_string_lossy().into_owned();
Self::scan_parquet_impl(path_string, None, args.cache, false)
Self::scan_parquet_impl(path_string, args.n_rows, args.cache, false)
})
.collect::<Result<Vec<_>>>()?;

Expand Down

0 comments on commit 76ff4be

Please sign in to comment.