Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require all zero argument UDFs use Signature::Nullary, improve error messages #22

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

jayzhan211
Copy link

@jayzhan211 jayzhan211 commented Dec 22, 2024

…rgument functions

- Updated the `Simple0ArgsScalarUDF` to utilize `Signature::nullary` instead of `Signature::exact`.
- Modified tests to reflect the change in signature handling for zero-argument functions.
- Enhanced error messages in type coercion functions to clarify the requirement for nullary signatures.
- Cleaned up redundant checks and improved code readability in the type coercion logic.

This change improves consistency in how zero-argument functions are defined and validated across the codebase.
Signed-off-by: Jay Zhan <[email protected]>
@@ -614,47 +612,6 @@ mod tests {

use super::*;

#[test]
fn supports_zero_argument_tests() {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

covered in core/tests/udf.

@alamb alamb changed the title Converge zero args to Nullary Require all zero argument UDFs use Signature::Nullary, improve error messages Dec 22, 2024
Copy link
Owner

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jayzhan211 -- makes sense to me. I will merge this PR and update the description

@alamb alamb merged commit 4e99fcf into alamb:alamb/signature_nullary Dec 22, 2024
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants