yyy1000 commented on code in PR #9522:
URL: https://github.com/apache/arrow-datafusion/pull/9522#discussion_r1518714199
##########
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:
I wonder if `arg_types` is empty, would here also get the empty `arg_types`
since this param is calculated in the same way before? 🤔
--
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]