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 2021/06/30 06:38:11 UTC

[GitHub] [arrow-rs] jorgecarleitao commented on issue #510: `nullif` operating on `ArrayRef`

jorgecarleitao commented on issue #510:
URL: https://github.com/apache/arrow-rs/issues/510#issuecomment-871136975


   Yep, that aligns well with the other kernels, and it is in general preferable as it avoids others having to do the same.
   
   I would use `&dyn Array` instead of `ArrayRef` as its argument, since there is no need to require `Arcing` an array for using the kernel. With this signature, we can write
   
   ```rust
   let array: PrimtiveArray<i32> = ...;
   let array = nullif(&array)?;
   ```
   
   instead of 
   
   ```rust
   let array: PrimtiveArray<i32> = ...;
   let array = nullif(&Arc::new(array))?;
   ```
   


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