alamb opened a new pull request, #13881:
URL: https://github.com/apache/datafusion/pull/13881

   ## Which issue does this PR close?
   
   - Closes https://github.com/apache/datafusion/issues/13763
   
   
   ## Rationale for this change
   
   As described on https://github.com/apache/datafusion/issues/13763
   
   In version s 43.0.0 and earlier of DataFusion, a `TypeSignature::Any(0)` 
means your udf could be called with zero arguments:
   ```sql
   SELECT my_udf();
   ```
   
   However in version 44.0.0 you get a very confusing error that says zero 
arguments are not supported but then gives you a candidate function is the one 
it just said was not supported:
   
   ```sql
   SELECT my_udf();
   
   Error during planning: example_union does not support zero arguments. 
   No function matches the given name and argument types 'my_udf()'. 
   You might need to add explicit type casts.
   
   Candidate functions:
   example_union()
   ```
   
   
   ## What changes are included in this PR?
   
   Improve error message to direct people to nullary
   
   ## Are these changes tested?
   Yes by CI
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


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