diff --git a/crates/polars-ops/src/frame/join/hash_join/single_keys_inner.rs b/crates/polars-ops/src/frame/join/hash_join/single_keys_inner.rs index a97431c67e12..da6bd64a3134 100644 --- a/crates/polars-ops/src/frame/join/hash_join/single_keys_inner.rs +++ b/crates/polars-ops/src/frame/join/hash_join/single_keys_inner.rs @@ -60,7 +60,7 @@ where .map(|v| v.clone().into_iter().size_hint().1.unwrap()) .sum(); if !join_nulls { - expected_size = expected_size - build_null_count; + expected_size -= build_null_count; } let hash_tbls = build_tables(build, join_nulls); let build_size = hash_tbls.iter().map(|m| m.len()).sum(); diff --git a/crates/polars-ops/src/frame/join/hash_join/single_keys_left.rs b/crates/polars-ops/src/frame/join/hash_join/single_keys_left.rs index 0367770701e2..b23d9de1776f 100644 --- a/crates/polars-ops/src/frame/join/hash_join/single_keys_left.rs +++ b/crates/polars-ops/src/frame/join/hash_join/single_keys_left.rs @@ -127,7 +127,7 @@ where let hash_tbls = if validate.needs_checks() { let mut expected_size = build.iter().map(|v| v.size_hint().1.unwrap()).sum(); if !join_nulls { - expected_size = expected_size - build_null_count; + expected_size -= build_null_count; } let hash_tbls = build_tables(build, join_nulls); let build_size = hash_tbls.iter().map(|m| m.len()).sum();