Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
xinlifoobar committed Jul 3, 2024
1 parent bac49cf commit 515bce6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
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 @@ -978,7 +978,7 @@ impl SessionState {

query = query.with_user_defined_planner(position_planner);
}

query
}
}
Expand Down
5 changes: 1 addition & 4 deletions datafusion/expr/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ pub trait UserDefinedSQLPlanner: Send + Sync {

// Plan the POSITION expression, e.g., POSITION(<expr> in <expr>)
// returns origin expression arguments if not possible
fn plan_position(
&self,
args: Vec<Expr>
) -> Result<PlannerResult<Vec<Expr>>> {
fn plan_position(&self, args: Vec<Expr>) -> Result<PlannerResult<Vec<Expr>>> {
Ok(PlannerResult::Original(args))
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/unicode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ pub mod character_length;
pub mod find_in_set;
pub mod left;
pub mod lpad;
pub mod planner;
pub mod reverse;
pub mod right;
pub mod rpad;
pub mod strpos;
pub mod substr;
pub mod substrindex;
pub mod translate;
pub mod planner;

// create UDFs
make_udf_function!(
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 @@ -33,4 +33,4 @@ impl UserDefinedSQLPlanner for PositionPlanner {
ScalarFunction::new_udf(crate::unicode::strpos(), args),
)))
}
}
}
3 changes: 2 additions & 1 deletion datafusion/sql/src/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
SQLExpr::Position { expr, r#in } => {
let substr =
self.sql_expr_to_logical_expr(*expr, schema, planner_context)?;
let fullstr = self.sql_expr_to_logical_expr(*r#in, schema, planner_context)?;
let fullstr =
self.sql_expr_to_logical_expr(*r#in, schema, planner_context)?;
let mut extract_args = vec![fullstr, substr];

for planner in self.planners.iter() {
Expand Down

0 comments on commit 515bce6

Please sign in to comment.