File tree Expand file tree Collapse file tree
datafusion/physical-expr/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments