alamb commented on code in PR #13881:
URL: https://github.com/apache/datafusion/pull/13881#discussion_r1894938593


##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -50,17 +50,23 @@ pub fn data_types_with_scalar_udf(
     func: &ScalarUDF,
 ) -> Result<Vec<DataType>> {
     let signature = func.signature();
+    let type_signature = &signature.type_signature;
 
     if current_types.is_empty() {
-        if signature.type_signature.supports_zero_argument() {
+        if type_signature.supports_zero_argument() {
             return Ok(vec![]);
         } else {
-            return plan_err!("{} does not support zero arguments.", 
func.name());
+            if type_signature.used_to_support_zero_arguments() {

Review Comment:
   Unless this check is present, the error messages about 
TypeSignature::nullary are confusing as they are shown when the function is 
called with zero args, even if its signature requires something else (like 
exact signatures, etc)



-- 
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

Reply via email to