Skip to content

Commit

Permalink
fix(rust): Add missing chunk align in pipe sink (pola-rs#18457)
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp authored and r-brink committed Aug 29, 2024
1 parent fb818cb commit b9c2ad1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/polars-pipe/src/executors/sinks/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ impl IOThread {
if let Some(partitions) = partitions {
for (part, mut df) in partitions.into_no_null_iter().zip(iter) {
df.shrink_to_fit();
df.align_chunks();
let mut path = dir2.clone();
path.push(format!("{part}"));

Expand All @@ -193,6 +194,7 @@ impl IOThread {

for mut df in iter {
df.shrink_to_fit();
df.align_chunks();
writer.write_batch(&df).unwrap();
}
writer.finish().unwrap();
Expand Down

0 comments on commit b9c2ad1

Please sign in to comment.