Skip to content

Commit

Permalink
chore: fmt + clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Aug 4, 2024
1 parent 31a1aa6 commit 7a7a065
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions crates/core/src/operations/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn ExecutionPlan>],
session_state: &SessionState,
_session_state: &SessionState,
) -> DataFusionResult<Option<Arc<dyn ExecutionPlan>>> {
if let Some(metric_observer) = node.as_any().downcast_ref::<MetricObserver>() {
if metric_observer.id.eq(SOURCE_COUNT_ID) {
Expand Down Expand Up @@ -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())?
Expand Down Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions crates/core/src/operations/merge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 7a7a065

Please sign in to comment.