tustvold commented on issue #6528:
URL: https://github.com/apache/arrow-rs/issues/6528#issuecomment-2654040492

   This request has come up again on 
https://github.com/apache/arrow-rs/issues/7119#issuecomment-2654025232
   
   I think adding a function along the lines of (possibly with Result and some 
error handling)
   
   ```
   pub fn mask(a: &dyn Array, mask: &BooleanBuffer) -> ArrayRef {
       let nulls = a.nulls().clone();
       let builder = a.to_data().into_builder();
       
       let builder = match nulls {
           None => builder.nulls(Some(mask.clone().into())),
           Some(nulls) => builder.nulls((mask & nulls.inner()).into())
       };
       
       make_array(unsafe {builder.build_unchecked()})
   }
   ```
   
   Would be a valuable addition


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