alamb commented on code in PR #14094: URL: https://github.com/apache/datafusion/pull/14094#discussion_r1912432276
########## datafusion/expr/src/udf.rs: ########## @@ -342,6 +352,14 @@ pub struct ScalarFunctionArgs<'a> { pub return_type: &'a DataType, } +#[derive(Debug)] +pub struct ReturnTypeArgs<'a> { + /// The data types of the arguments to the function + pub arg_types: &'a [DataType], + /// The Utf8 arguments to the function, if the expression is not Utf8, it will be empty string + pub arguments: &'a [String], Review Comment: I am also not sure about only supporting string args, that is likely a regression in behavior for some users (For example, maybe they look for constant integers as well) ########## datafusion/expr/src/udf.rs: ########## @@ -342,6 +352,14 @@ pub struct ScalarFunctionArgs<'a> { pub return_type: &'a DataType, } +#[derive(Debug)] +pub struct ReturnTypeArgs<'a> { + /// The data types of the arguments to the function + pub arg_types: &'a [DataType], + /// The Utf8 arguments to the function, if the expression is not Utf8, it will be empty string + pub arguments: &'a [String], Review Comment: Would it be possible to unify the argument handling so that both return type and nullability are returned the same? I wonder if it would somehow be possible to add the input nullable information here too 🤔 -- 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