Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Dec 15, 2023
1 parent e64008a commit ffb65c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/daft-plan/src/optimization/rules/push_down_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use daft_dsl::{
optimization::{get_required_columns, replace_columns_with_expressions},
Expr,
};
use daft_scan::ScanExternalInfo;

use crate::{
logical_ops::{Concat, Filter, Project, Source},
Expand Down Expand Up @@ -93,7 +92,7 @@ impl OptimizerRule for PushDownFilter {
// Pushdown filter into the Source node
SourceInfo::ExternalInfo(external_info) => {
let predicate = &filter.predicate;
let new_predicate = external_info.pushdowns().filters.as_ref().and_then(|f| Some(f.and(predicate))).unwrap_or(predicate.clone());
let new_predicate = external_info.pushdowns().filters.as_ref().map(|f| f.and(predicate)).unwrap_or(predicate.clone());
let new_pushdowns =
external_info.pushdowns().with_filters(Some(Arc::new(new_predicate)));
let new_external_info = external_info.with_pushdowns(new_pushdowns);
Expand Down

0 comments on commit ffb65c2

Please sign in to comment.