alamb commented on code in PR #8988:
URL: https://github.com/apache/arrow-datafusion/pull/8988#discussion_r1475130339


##########
datafusion/sql/src/expr/mod.rs:
##########
@@ -704,7 +706,20 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         };
         Ok(Expr::ScalarFunction(ScalarFunction::new(fun, args)))
     }
-
+    fn sql_position_to_expr(
+        &self,
+        substr_expr: SQLExpr,
+        str_expr: SQLExpr,
+        schema: &DFSchema,
+        planner_context: &mut PlannerContext,
+    ) -> Result<Expr> {
+        let fun = BuiltinScalarFunction::Position;

Review Comment:
   I think if we changed this code to use `BuiltinScalarFunction::Instr` we 
could remove `BuiltinScalarFunction::Position` entirely which would make this 
PR much simpler and address @Weijun-H and my concerns about duplication
   
   What do you think @Lordworms 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to