Skip to content

Commit 7453e4d

Browse files
committed
chore: fix cargo audit on main
1 parent 5c653be commit 7453e4d

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3770,11 +3770,11 @@ impl PartialOrd for Aggregate {
37703770
/// Returns 0 when no grouping set is duplicated.
37713771
fn max_grouping_set_duplicate_ordinal(group_expr: &[Expr]) -> usize {
37723772
if let Some(Expr::GroupingSet(GroupingSet::GroupingSets(sets))) = group_expr.first() {
3773-
let mut counts: HashMap<&[Expr], usize> = HashMap::new();
3774-
for set in sets {
3775-
*counts.entry(set).or_insert(0) += 1;
3776-
}
3777-
counts.into_values().max().unwrap_or(0).saturating_sub(1)
3773+
sets.iter()
3774+
.map(|set| sets.iter().filter(|other| *other == set).count())
3775+
.max()
3776+
.unwrap_or(0)
3777+
.saturating_sub(1)
37783778
} else {
37793779
0
37803780
}

0 commit comments

Comments
 (0)