Skip to content

Commit 481394b

Browse files
committed
clippy
1 parent cc00095 commit 481394b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

datafusion/physical-expr/src/analysis.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,11 @@ mod tests {
485485
.unwrap_err();
486486
assert_contains!(analysis_error.to_string(), expected_error);
487487
}
488+
489+
// ---------------------------------------------------------------------------
490+
// Unit tests for singleton_selectivity and calculate_selectivity
491+
// ---------------------------------------------------------------------------
492+
488493
fn make_boundary(lower: i32, upper: i32, distinct_count: usize) -> ExprBoundaries {
489494
ExprBoundaries {
490495
column: Column::new("a", 0),
@@ -542,9 +547,11 @@ mod tests {
542547
fn test_calculate_selectivity_already_singleton_initial_interval() {
543548
let already_singleton = make_boundary(7, 7, 1);
544549

545-
let selectivity =
546-
calculate_selectivity(&[already_singleton.clone()], &[already_singleton])
547-
.unwrap();
550+
let selectivity = calculate_selectivity(
551+
std::slice::from_ref(&already_singleton),
552+
std::slice::from_ref(&already_singleton),
553+
)
554+
.unwrap();
548555

549556
let wide_initial = make_boundary(1, 100, 50);
550557
let same_singleton_target = make_boundary(7, 7, 50);

0 commit comments

Comments
 (0)