From 7a7a0655a2fc39f113c642ed64d6561ac96ef613 Mon Sep 17 00:00:00 2001 From: ion-elgreco <15728914+ion-elgreco@users.noreply.github.com> Date: Sun, 4 Aug 2024 14:23:19 +0200 Subject: [PATCH] chore: fmt + clippy --- crates/core/src/operations/delete.rs | 8 ++++---- crates/core/src/operations/merge/mod.rs | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/crates/core/src/operations/delete.rs b/crates/core/src/operations/delete.rs index 16577ee7d7..c6ae8f8ebe 100644 --- a/crates/core/src/operations/delete.rs +++ b/crates/core/src/operations/delete.rs @@ -143,11 +143,11 @@ struct DeleteMetricExtensionPlanner {} impl ExtensionPlanner for DeleteMetricExtensionPlanner { async fn plan_extension( &self, - planner: &dyn PhysicalPlanner, + _planner: &dyn PhysicalPlanner, node: &dyn UserDefinedLogicalNode, _logical_inputs: &[&LogicalPlan], physical_inputs: &[Arc], - session_state: &SessionState, + _session_state: &SessionState, ) -> DataFusionResult>> { if let Some(metric_observer) = node.as_any().downcast_ref::() { if metric_observer.id.eq(SOURCE_COUNT_ID) { @@ -191,7 +191,7 @@ async fn excute_non_empty_expr( let scan_config = DeltaScanConfigBuilder::default() .with_file_column(false) .with_schema(snapshot.input_schema()?) - .build(&snapshot)?; + .build(snapshot)?; let target_provider = Arc::new( DeltaTableProvider::try_new(snapshot.clone(), log_store.clone(), scan_config.clone())? @@ -258,7 +258,7 @@ async fn excute_non_empty_expr( } // CDC logic, simply filters data with predicate and adds the _change_type="delete" as literal column - if let Ok(true) = should_write_cdc(&snapshot) { + if let Ok(true) = should_write_cdc(snapshot) { // Create CDC scan let change_type_lit = lit(ScalarValue::Utf8(Some("delete".to_string()))); let cdc_filter = df diff --git a/crates/core/src/operations/merge/mod.rs b/crates/core/src/operations/merge/mod.rs index f26fc21129..ea54e4e211 100644 --- a/crates/core/src/operations/merge/mod.rs +++ b/crates/core/src/operations/merge/mod.rs @@ -35,15 +35,13 @@ use std::time::Instant; use async_trait::async_trait; use datafusion::datasource::provider_as_source; use datafusion::error::Result as DataFusionResult; -use datafusion::execution::context::{QueryPlanner, SessionConfig}; +use datafusion::execution::context::SessionConfig; use datafusion::logical_expr::build_join_schema; -use datafusion::physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner}; +use datafusion::physical_plan::metrics::MetricBuilder; +use datafusion::physical_planner::{ExtensionPlanner, PhysicalPlanner}; use datafusion::{ execution::context::SessionState, - physical_plan::{ - metrics::{MetricBuilder, MetricsSet}, - ExecutionPlan, - }, + physical_plan::ExecutionPlan, prelude::{DataFrame, SessionContext}, }; use datafusion_common::tree_node::{Transformed, TreeNode};