-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestregressionSomething that used to work no longer doesSomething that used to work no longer does
Description
Is your feature request related to a problem or challenge?
While working to reproduce the issue from @kylebarron here:
He had this signature for a UDF that has no arguments
impl UnionExample {
pub fn new() -> Self {
Self {
signature: Signature::any(0, Volatility::Immutable),
}
}
}This compiled without error / incident
However, when I ran that on latest main I got a very strange (to me) error:
called
Result::unwrap()on anErrvalue: Plan("Error during planning: example_union does not support zero arguments. No function matches the given name and argument types 'example_union()'. You might need to add explicit type casts.\n\tCandidate functions:\n\texample_union()")
To fix it I found I had to:
- signature: Signature::any(0, Volatility::Immutable),
+ signature: Signature::nullary(Volatility::Volatile),I think this will make upgrading to 44 a pain
Describe the solution you'd like
I would like DataFusion to either:
- Support the old style signature for zero args
- Generate a clear error that tells me what I have to fix in my code (aka change to
nullary
Describe alternatives you've considered
No response
Additional context
Nullary appears to have been added in this PR by @jayzhan211
kylebarron
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestregressionSomething that used to work no longer doesSomething that used to work no longer does