@@ -645,7 +645,7 @@ impl LogicalPlan {
645
645
. collect :: < Vec < _ > > ( ) ,
646
646
} ) )
647
647
}
648
- LogicalPlan :: Filter ( filter ) => {
648
+ LogicalPlan :: Filter { .. } => {
649
649
assert_eq ! ( 1 , expr. len( ) ) ;
650
650
let predicate = expr. pop ( ) . unwrap ( ) ;
651
651
@@ -687,7 +687,7 @@ impl LogicalPlan {
687
687
let mut remove_aliases = RemoveAliases { } ;
688
688
let predicate = predicate. rewrite ( & mut remove_aliases) ?;
689
689
690
- Filter :: try_new ( predicate, Arc :: new ( inputs[ 0 ] . clone ( ) ) , filter . default_selectivity )
690
+ Filter :: try_new ( predicate, Arc :: new ( inputs[ 0 ] . clone ( ) ) )
691
691
. map ( LogicalPlan :: Filter )
692
692
}
693
693
LogicalPlan :: Repartition ( Repartition {
@@ -1887,13 +1887,11 @@ pub struct Filter {
1887
1887
pub predicate : Expr ,
1888
1888
/// The incoming logical plan
1889
1889
pub input : Arc < LogicalPlan > ,
1890
- // Selectivity
1891
- pub default_selectivity : u8 ,
1892
1890
}
1893
1891
1894
1892
impl Filter {
1895
1893
/// Create a new filter operator.
1896
- pub fn try_new ( predicate : Expr , input : Arc < LogicalPlan > , default_selectivity : u8 ) -> Result < Self > {
1894
+ pub fn try_new ( predicate : Expr , input : Arc < LogicalPlan > ) -> Result < Self > {
1897
1895
// Filter predicates must return a boolean value so we try and validate that here.
1898
1896
// Note that it is not always possible to resolve the predicate expression during plan
1899
1897
// construction (such as with correlated subqueries) so we make a best effort here and
@@ -1914,10 +1912,8 @@ impl Filter {
1914
1912
aliased."
1915
1913
) ;
1916
1914
}
1917
- if default_selectivity > 100 {
1918
- return plan_err ! ( "Filter Selectivity must be between 0 and 100" ) ;
1919
- }
1920
- Ok ( Self { predicate, input, default_selectivity } )
1915
+
1916
+ Ok ( Self { predicate, input } )
1921
1917
}
1922
1918
}
1923
1919
0 commit comments