jorgecarleitao commented on a change in pull request #7967:
URL: https://github.com/apache/arrow/pull/7967#discussion_r475266986
##########
File path: rust/datafusion/src/execution/physical_plan/planner.rs
##########
@@ -306,32 +305,25 @@ impl DefaultPhysicalPlanner {
input_schema,
data_type.clone(),
),
- Expr::ScalarFunction {
- name,
- args,
- return_type,
- } => match ctx_state.scalar_functions.get(name) {
- Some(f) => {
- let mut physical_args = vec![];
- for e in args {
- physical_args.push(self.create_physical_expr(
- e,
- input_schema,
- ctx_state.clone(),
- )?);
+ Expr::ScalarFunction { name, args, .. } => {
+ match ctx_state.scalar_functions.get(name) {
+ Some(f) => {
+ let mut physical_args = vec![];
+ for e in args {
+ physical_args.push(self.create_physical_expr(
+ e,
+ input_schema,
+ ctx_state.clone(),
+ )?);
+ }
+ function(f, physical_args, input_schema)
Review comment:
Note how `function` is called here. This is responsible for coercing
udf's arguments to valid signatures.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]