You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/01 06:18:24 UTC

[GitHub] [arrow-rs] matthewmturner opened a new issue #1119: Add power compute kernel

matthewmturner opened a new issue #1119:
URL: https://github.com/apache/arrow-rs/issues/1119


   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for this feature, in addition to  the *what*)
   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.
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] jackwener commented on issue #1119: Add power compute kernel

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #1119:
URL: https://github.com/apache/arrow-rs/issues/1119#issuecomment-1065836337


   I notices some code in `arrow/src/compute/kernels/arithmetic.rs`
   
   ```rust
   pub fn powf_scalar<T>(
       array: &PrimitiveArray<T>,
       raise: T::Native,
   ) -> Result<PrimitiveArray<T>>
   ```


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org