empty condition is same as no condition
@@ -47,19 +47,22 @@ pub fn estimate_filter<F>(estimator: &F, filter: &Filter, total: usize) -> Cardi
match &filter.must {
None => {}
- Some(conditions) =>
+ Some(conditions) => if !conditions.is_empty() {
filter_estimations.push(estimate_must(estimator, conditions, total))
}
+ }
match &filter.should {
None => {}
- Some(conditions) =>
+ Some(conditions) => if !conditions.is_empty() {
filter_estimations.push(estimate_should(estimator, conditions, total))
}
+ }
match &filter.must_not {
None => {}
- Some(conditions) =>
+ Some(conditions) => if !conditions.is_empty() {
filter_estimations.push(estimate_must_not(estimator, conditions, total))
}
+ }
combine_must_estimations(&filter_estimations, total)
}
