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

   ### Is your feature request related to a problem or challenge?
   
   As part of https://github.com/apache/arrow-datafusion/issues/8045 we need to 
ensure that scalar UDFs have the same functionality as built in functions. 
   
   One gap that currently exists is "aliases".  
   
   For example, `pow` and `power` are both resolved to the same function.
   
   
   
   
   ### Describe the solution you'd like
   
   Implement aliasing for ScalarUDF
   
   Basically :
   1. Add aliasing to ScalarUDF API
   2. Hook it up so that ScalarUDF can accept aliases and that the planner can 
use them
   3. Write an end to end test (probably in 
https://github.com/apache/arrow-datafusion/blob/32fe1761287c9b58294a54805a0fcafc4ab046b8/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs#L1-L0)
   
   I am envisioning creating a scalar UDF with a new function `with_alias`. 
Something like
   
   ```rust
   ScalarUDF::new(
           "pow",
           &Signature::exact(input_types, volatility),
           &return_type,
           &fun,
       )
      .with_alias("power")
   ```
   
   
   Currently the alias list is here: 
   
https://github.com/apache/arrow-datafusion/blob/094a0e2d0c8c1f71c985c7bfdf21433ebc8f203e/datafusion/expr/src/built_in_function.rs#L1374
   
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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

Reply via email to