alamb commented on code in PR #15646: URL: https://github.com/apache/datafusion/pull/15646#discussion_r2038019878
########## datafusion/expr/src/udf.rs: ########## @@ -293,9 +293,11 @@ where /// Arguments passed to [`ScalarUDFImpl::invoke_with_args`] when invoking a /// scalar function. -pub struct ScalarFunctionArgs<'a> { +pub struct ScalarFunctionArgs<'a, 'b> { /// The evaluated arguments to the function pub args: Vec<ColumnarValue>, + /// Field associated with each arg, if it exists + pub arg_fields: Vec<Option<&'b Field>>, /// The number of rows in record batch being evaluated pub number_rows: usize, Review Comment: I think we should also remove `ReturnTypeInfo` and `return_type` and have a single way to return values -- `output_field` (or `return_field`?) ########## datafusion/expr/src/udf.rs: ########## @@ -293,9 +293,11 @@ where /// Arguments passed to [`ScalarUDFImpl::invoke_with_args`] when invoking a /// scalar function. -pub struct ScalarFunctionArgs<'a> { +pub struct ScalarFunctionArgs<'a, 'b> { /// The evaluated arguments to the function pub args: Vec<ColumnarValue>, + /// Field associated with each arg, if it exists + pub arg_fields: Vec<Option<&'b Field>>, /// The number of rows in record batch being evaluated pub number_rows: usize, Review Comment: Perhaps we should change the return type to also be `pub return_field: &'a Field` to be consistetn -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org