Skip to content

Commit

Permalink
Renamed user_defined_sql_planners to expr_planners
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Jul 6, 2024
1 parent 092db8b commit eaeca46
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,8 @@ impl FunctionRegistry for SessionContext {
self.state.write().register_function_rewrite(rewrite)
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
self.state.read().user_defined_sql_planners()
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
self.state.read().expr_planners()
}

fn register_user_defined_sql_planner(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/execution/session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ impl FunctionRegistry for SessionState {
Ok(())
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
self.user_defined_sql_planners.clone()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ async fn test_user_defined_functions_cast_to_i64() -> Result<()> {
async fn test_user_defined_sql_functions() -> Result<()> {
let ctx = SessionContext::new();

let sql_planners = ctx.user_defined_sql_planners();
let sql_planners = ctx.expr_planners();

assert!(!sql_planners.is_empty());

Expand Down
2 changes: 1 addition & 1 deletion datafusion/execution/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl FunctionRegistry for TaskContext {
Ok(self.scalar_functions.insert(udf.name().into(), udf))
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
vec![]
}
}
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub trait FunctionRegistry {
}

/// Set of all registered [`UserDefinedSQLPlanner`]s
fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>>;
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>>;

/// Registers a new [`UserDefinedSQLPlanner`] with the registry.
fn register_user_defined_sql_planner(
Expand Down Expand Up @@ -196,7 +196,7 @@ impl FunctionRegistry for MemoryFunctionRegistry {
Ok(self.udwfs.insert(udaf.name().into(), udaf))
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
vec![]
}
}
2 changes: 1 addition & 1 deletion datafusion/proto/src/bytes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl Serializeable for Expr {
)
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
vec![]
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto/src/bytes/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl FunctionRegistry for NoRegistry {
plan_err!("No function registry provided to deserialize, so can not deserialize User Defined Window Function '{}'", udwf.inner().name())
}

fn user_defined_sql_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
fn expr_planners(&self) -> Vec<Arc<dyn UserDefinedSQLPlanner>> {
vec![]
}
}

0 comments on commit eaeca46

Please sign in to comment.