Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <[email protected]>
  • Loading branch information
jayzhan211 committed Jun 12, 2024
1 parent 33a02f9 commit 4b13fc0
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions datafusion/physical-expr/src/aggregate/build_in.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,18 @@ mod tests {
&input_schema,
"c1",
)?;
match fun {
AggregateFunction::ArrayAgg => {
assert!(result_agg_phy_exprs.as_any().is::<ArrayAgg>());
assert_eq!("c1", result_agg_phy_exprs.name());
assert_eq!(
Field::new_list(
"c1",
Field::new("item", data_type.clone(), true),
true,
),
result_agg_phy_exprs.field().unwrap()
);
}
_ => {}
};
if fun == AggregateFunction::ArrayAgg {
assert!(result_agg_phy_exprs.as_any().is::<ArrayAgg>());
assert_eq!("c1", result_agg_phy_exprs.name());
assert_eq!(
Field::new_list(
"c1",
Field::new("item", data_type.clone(), true),
true,
),
result_agg_phy_exprs.field().unwrap()
);
}

let result_distinct = create_physical_agg_expr_for_test(
&fun,
Expand All @@ -371,21 +368,18 @@ mod tests {
&input_schema,
"c1",
)?;
match fun {
AggregateFunction::ArrayAgg => {
assert!(result_distinct.as_any().is::<DistinctArrayAgg>());
assert_eq!("c1", result_distinct.name());
assert_eq!(
Field::new_list(
"c1",
Field::new("item", data_type.clone(), true),
true,
),
result_agg_phy_exprs.field().unwrap()
);
}
_ => {}
};
if fun == AggregateFunction::ArrayAgg {
assert!(result_distinct.as_any().is::<DistinctArrayAgg>());
assert_eq!("c1", result_distinct.name());
assert_eq!(
Field::new_list(
"c1",
Field::new("item", data_type.clone(), true),
true,
),
result_agg_phy_exprs.field().unwrap()
);
}
}
}
Ok(())
Expand Down

0 comments on commit 4b13fc0

Please sign in to comment.