Add power compute kernel
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 1.3k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 167
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
We are working on adding a `power` function / operator to datafusion (https://github.com/apache/arrow-datafusion/issues/1493). Rather than implementing in datafusion i propose adding it as a compute kernel in arrow because we can implement directly with rust float primitives (https://doc.rust-lang.org/std/primitive.u32.html#method.pow, https://doc.rust-lang.org/std/primitive.f32.html#method.powf, etc) without any additional logic, similar to existing arrow compute kernels, and this aligns with the C++ compute implementation (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)
**Describe the solution you'd like**
`power` (using two arrays) and `power_scalar` (array and scalar) compute kernels
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Start by examining the existing Arrow Rust compute kernels and the linked Rust primitive methods, then compare the C++ arithmetic functions and arrow2 power implementation referenced in the issue. Done means providing the requested power and power_scalar kernels for array and scalar inputs, with behavior aligned with the surrounding compute APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100