-
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
Implement power
function
#1493
Comments
ill work on this |
ive started looking into this and i think it makes sense to add @alamb ok with that? |
@matthewmturner I think |
@alamb ok happy to do that. but just to show you where i was coming from, i saw both C++ (https://arrow.apache.org/docs/cpp/compute.html#arithmetic-functions) and arrow2 (https://github.com/jorgecarleitao/arrow2/blob/main/src/compute/arithmetics/basic/pow.rs) had kernels for power. so i thought we would want to do something similar and not have datafusion implement something that could / should be done downstream. |
@matthewmturner -- I don't have a strong preference. |
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: #147 (comment)
Describe the solution you'd like
Implement the
power
function as described in https://www.postgresql.org/docs/14/functions-math.htmlDescribe alternatives you've considered
It may also be interesting to investigate adding support for
a**b
as another way to write the same thingAdditional 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
The text was updated successfully, but these errors were encountered: