alamb opened a new issue, #13763:
URL: https://github.com/apache/datafusion/issues/13763

   ### Is your feature request related to a problem or challenge?
   
   While working to reproduce the issue from @kylebarron here: 
   - https://github.com/apache/datafusion/issues/13762
   
   He had this signature for a UDF that has no arguments
   ```rust
   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 an `Err` value: 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:
   
   ```diff
   -            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:
   1. Support the old style signature for zero args
   2. 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
   - https://github.com/apache/datafusion/pull/13354


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