-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use take_function_args
in more places
#14525
base: main
Are you sure you want to change the base?
Conversation
@findepi Is there a good way to use |
I think you would have to move it somwehere like |
Sounds good, I should get to that this weekend and then I'll apply |
if arg_types.len() != 1 { | ||
return exec_err!("SUM expects exactly one argument"); | ||
} | ||
let [array] = take_function_args(self.name(), arg_types)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is so much nicer
FYI @findepi |
Thank you so much @lgingerich I started the CI checks FYI When I ran some of the tests locally I saw some failures which seem to be related:
|
@alamb Should be fixed now. I just didn't have the language of the test properly matching this new function. |
I'll check out these new errors later today. Is there a simple way to run all these tests locally without manually running each of the difference cargo test combinations? (I'm on MacOS) |
not sure -- there may be some scripts here https://github.com/apache/datafusion/tree/main/ci/scripts It would be great to help make it easier to test locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @lgingerich -- this looks great to me
Which issue does this PR close?
take_function_args
to functions validating argument count #14516.What changes are included in this PR?
Refactor manual function argument count validation to use the
take_function_args
function.Are these changes tested?
All changes are covered by existing tests.
Are there any user-facing changes?
No.