Skip to content

Commit

Permalink
use .any instead of filter/count
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed May 20, 2021
1 parent 688dde4 commit 2c6a23b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions datafusion/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ impl<'a> StatisticsExpressionBuilder<'a> {
}

fn is_stat_column_missing(&self, statistics_type: StatisticsType) -> bool {
self.stat_column_req
!self
.stat_column_req
.iter()
.filter(|(c, t, _f)| c == &self.column_name && t == &statistics_type)
.count()
== 0
.any(|(c, t, _f)| c == &self.column_name && t == &statistics_type)
}

fn stat_column_expr(
Expand Down

0 comments on commit 2c6a23b

Please sign in to comment.