From ffb65c2bb772beddd4d7ade33aef24f86182c260 Mon Sep 17 00:00:00 2001 From: Sammy Sidhu Date: Thu, 14 Dec 2023 16:46:10 -0800 Subject: [PATCH] clippy fixes --- src/daft-plan/src/optimization/rules/push_down_filter.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/daft-plan/src/optimization/rules/push_down_filter.rs b/src/daft-plan/src/optimization/rules/push_down_filter.rs index 839cdf468f..225ef845a7 100644 --- a/src/daft-plan/src/optimization/rules/push_down_filter.rs +++ b/src/daft-plan/src/optimization/rules/push_down_filter.rs @@ -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}, @@ -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);