Skip to content

Commit 2c6a23b

Browse files
committed
use .any instead of filter/count
1 parent 688dde4 commit 2c6a23b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

datafusion/src/physical_optimizer/pruning.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,10 @@ impl<'a> StatisticsExpressionBuilder<'a> {
244244
}
245245

246246
fn is_stat_column_missing(&self, statistics_type: StatisticsType) -> bool {
247-
self.stat_column_req
247+
!self
248+
.stat_column_req
248249
.iter()
249-
.filter(|(c, t, _f)| c == &self.column_name && t == &statistics_type)
250-
.count()
251-
== 0
250+
.any(|(c, t, _f)| c == &self.column_name && t == &statistics_type)
252251
}
253252

254253
fn stat_column_expr(

0 commit comments

Comments
 (0)