Skip to content

Commit

Permalink
check empty case
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Sep 23, 2023
1 parent 913e9eb commit baa8ecc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/polars-time/src/windows/group_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ pub(crate) fn group_by_values_iter(

/// Checks if the boundary elements don't split on duplicates
fn check_splits(time: &[i64], thread_offsets: &[(usize, usize)]) -> bool {
if time.is_empty() {
return true;
}
let mut valid = true;
for window in thread_offsets.windows(2) {
let left_block_end = window[0].0 + window[0].1;
Expand Down

0 comments on commit baa8ecc

Please sign in to comment.