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


   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   We would like to compute a power function (like `2**4` = `2 * 2 * 2 * 2`) in 
datafusion
   
   @matthewmturner  asks for it here: 
https://github.com/apache/arrow-datafusion/issues/147#issuecomment-1001223018
   
   **Describe the solution you'd like**
   
   Implement the `power` function as described in 
https://www.postgresql.org/docs/14/functions-math.html
   
   ```
   power ( a numeric, b numeric ) → numeric
   power ( a double precision, b double precision ) → double precision
   
   a raised to the power of b
   
   power(9, 3) → 729
   ```
   
   **Describe alternatives you've considered**
   It may also be interesting to investigate adding support for `a**b` as 
another way to write the same thing
   
   **Additional context**
   This is probably a good ticket to learn about the datafusion codebase and 
its function implementations -- one could follow the example of one of the 
existing functions in 
   
   
https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/functions.rs
   


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