diff --git a/datafusion/core/src/physical_planner.rs b/datafusion/core/src/physical_planner.rs index d7bfb3bead54..d854cf41af96 100644 --- a/datafusion/core/src/physical_planner.rs +++ b/datafusion/core/src/physical_planner.rs @@ -1012,7 +1012,7 @@ impl DefaultPhysicalPlanner { let left_df_schema = left.schema(); let right_df_schema = right.schema(); let execution_props = session_state.execution_props(); - let config_options = Arc::new(session_state.config_options().clone()); + let config_options = session_state.config_options(); let join_on = keys .iter() .map(|(l, r)| { @@ -1020,13 +1020,13 @@ impl DefaultPhysicalPlanner { l, left_df_schema, execution_props, - &config_options, + config_options, )?; let r = create_physical_expr( r, right_df_schema, execution_props, - &config_options, + config_options, )?; Ok((l, r)) }) @@ -1099,7 +1099,7 @@ impl DefaultPhysicalPlanner { expr, &filter_df_schema, session_state.execution_props(), - &config_options, + config_options, )?; let column_indices = join_utils::JoinFilter::build_column_indices( left_field_indices, diff --git a/datafusion/optimizer/src/decorrelate_predicate_subquery.rs b/datafusion/optimizer/src/decorrelate_predicate_subquery.rs index 5b70d091312f..d99755be9970 100644 --- a/datafusion/optimizer/src/decorrelate_predicate_subquery.rs +++ b/datafusion/optimizer/src/decorrelate_predicate_subquery.rs @@ -104,12 +104,8 @@ impl OptimizerRule for DecorrelatePredicateSubquery { } // The subquery expression is embedded within another expression SubqueryPredicate::Embedded(expr) => { - let (plan, expr_without_subqueries) = rewrite_inner_subqueries( - cur_input, - expr, - config, - config.options(), - )?; + let (plan, expr_without_subqueries) = + rewrite_inner_subqueries(cur_input, expr, config)?; cur_input = plan; other_exprs.push(expr_without_subqueries); } @@ -137,7 +133,6 @@ fn rewrite_inner_subqueries( outer: LogicalPlan, expr: Expr, config: &dyn OptimizerConfig, - config_options: &ConfigOptions, ) -> Result<(LogicalPlan, Expr)> { let mut cur_input = outer; let alias = config.alias_generator(); @@ -151,7 +146,7 @@ fn rewrite_inner_subqueries( None, negated, alias, - config_options, + config.options(), )? { Some((plan, exists_expr)) => { cur_input = plan; @@ -176,7 +171,7 @@ fn rewrite_inner_subqueries( Some(in_predicate), negated, alias, - config_options, + config.options(), )? { Some((plan, exists_expr)) => { cur_input = plan; diff --git a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs index ae3cb286a231..2f2644d65117 100644 --- a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs +++ b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs @@ -137,7 +137,6 @@ impl ExprSimplifier { /// `b > 2` /// /// ``` - /// use std::sync::Arc; /// use arrow::datatypes::DataType; /// use datafusion_common::config::ConfigOptions; /// use datafusion_expr::{col, lit, Expr};