jayzhan211 commented on code in PR #9522:
URL: https://github.com/apache/arrow-datafusion/pull/9522#discussion_r1518722543
##########
datafusion/expr/src/udf.rs:
##########
@@ -307,12 +308,17 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
&self,
args: &[Expr],
schema: &dyn ExprSchema,
+ arg_types: &[DataType],
) -> Result<DataType> {
- let arg_types = args
- .iter()
- .map(|arg| arg.get_type(schema))
- .collect::<Result<Vec<_>>>()?;
- self.return_type(&arg_types)
+ if arg_types.is_empty() {
Review Comment:
if `arg_types` is not provided, we can get them from `args` and `schema`,
and it should not be empty.
--
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]