Skip to content

Commit

Permalink
fix: Divide-by-zero in OOC sort
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp committed Oct 1, 2024
1 parent e8e5b93 commit dd2a999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-pipe/src/executors/sinks/sort/ooc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub(super) fn sort_ooc(
.unwrap_or(1 << 26);
let samples = samples.to_physical_repr().into_owned();
let spill_size = std::cmp::min(
memtrack.get_available_latest() / (samples.len() * 3),
memtrack.get_available_latest() / (samples.len() * 3 + 1),
spill_size,
);

Expand Down

0 comments on commit dd2a999

Please sign in to comment.