From 453495246a8005118155e78a05c14d709e1a1e04 Mon Sep 17 00:00:00 2001 From: ritchie Date: Sat, 26 Oct 2024 10:45:02 +0200 Subject: [PATCH] refactor: Undo conflicting fix --- crates/polars-core/src/frame/group_by/perfect.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/polars-core/src/frame/group_by/perfect.rs b/crates/polars-core/src/frame/group_by/perfect.rs index 1b7c9ba4f593..ef228981f7e5 100644 --- a/crates/polars-core/src/frame/group_by/perfect.rs +++ b/crates/polars-core/src/frame/group_by/perfect.rs @@ -61,7 +61,6 @@ where per_thread_offsets.push(std::cmp::min(cache_aligned_offset, len)); } } - *per_thread_offsets.last_mut().unwrap() = len; let groups_ptr = unsafe { SyncPtr::new(groups.as_mut_ptr()) }; let first_ptr = unsafe { SyncPtr::new(first.as_mut_ptr()) }; @@ -76,9 +75,9 @@ where let end = per_thread_offsets[thread_no + 1]; let end = T::Native::from_usize(end).unwrap(); - if start == end { + if start == end && thread_no != n_threads - 1 { return; - } + }; let push_to_group = |cat, row_nr| unsafe { debug_assert!(cat < len);