Skip to content

Commit

Permalink
Move planner to session_state
Browse files Browse the repository at this point in the history
  • Loading branch information
xinlifoobar committed Jul 4, 2024
1 parent f6d3ae3 commit 92ac4cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions datafusion/core/src/execution/session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ impl SessionState {
Arc::new(functions_array::planner::FieldAccessPlanner),
#[cfg(feature = "datetime_expressions")]
Arc::new(functions::datetime::planner::ExtractPlanner),
#[cfg(feature = "unicode_expressions")]
Arc::new(functions::unicode::planner::PositionPlanner),
];

let mut new_self = SessionState {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/unicode/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use datafusion_expr::{
};

#[derive(Default)]
pub struct PositionPlanner {}
pub struct PositionPlanner;

impl UserDefinedSQLPlanner for PositionPlanner {
fn plan_position(&self, args: Vec<Expr>) -> Result<PlannerResult<Vec<Expr>>> {
Expand Down

0 comments on commit 92ac4cb

Please sign in to comment.