diff --git a/crates/polars-pipe/src/executors/sinks/sort/ooc.rs b/crates/polars-pipe/src/executors/sinks/sort/ooc.rs index 1c04f67a34a9..48a2f944b87d 100644 --- a/crates/polars-pipe/src/executors/sinks/sort/ooc.rs +++ b/crates/polars-pipe/src/executors/sinks/sort/ooc.rs @@ -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, );