Skip to content

Commit

Permalink
remove assert; it is a false positive (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Feb 23, 2022
1 parent aa249e4 commit c101f83
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions polars/polars-lazy/src/physical_plan/expressions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,12 @@ impl<'a> AggregationContext<'a> {
// because this is lazy, we first must to update the groups
// by calling .groups()
self.groups();
assert!(
self.groups.len() <= s.len(),
"implementation error groups are out of bounds; please open an issue"
);
#[cfg(debug_assertions)]
{
if self.groups.len() > s.len() {
eprintln!("groups may be out of bounds; more groups than elements in a series is only possible in dynamic groupby")
}
}

let out = s
.agg_list(&self.groups)
Expand Down

0 comments on commit c101f83

Please sign in to comment.