jeffreyssmith2nd opened a new pull request, #10916: URL: https://github.com/apache/datafusion/pull/10916
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Closes https://github.com/apache/datafusion/issues/10915. ## Rationale for this change The changes in https://github.com/apache/datafusion/pull/10651/ lead to a change in the error messages given when a function is called without any arguments. I think it can be made a little clearer to the user what actually went wrong, the error message as of this PR vs `main` can be seen below. The new error message as of this PR: ``` "Error during planning: Error during planning: SUM does not support zero arguments. No function matches the given name and argument types 'SUM()'. You might need to add explicit type casts.\n\tCandidate functions:\n\tSUM(UserDefine d)" ``` The current error message in main: ``` "Error during planning: Error during planning: [data_types_with_aggregate_udf] Coercion from [] to the signature VariadicAny failed. and No function matches the given name and argument types 'selector_last()'. You might need to add explicit type casts.\n\tCandidate functions:\n\tselector_last(Any, .., Any)" ``` <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? A few error messages are updated to provide users with a bit more context. ## Are these changes tested? <!-- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
