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


   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   The `nullif` kernel currently only applies to `PrimitiveArray<T>`. This 
makes it impossible to use with non-primitive types, which often arise when 
working with structured / nested data. Additionally, it seems like the `nullif` 
kernel should have a similar signature to `filter` -- where `filter` selects 
only the non-true rows,  `nullif` nulls out the true rows.
   
   **Describe the solution you'd like**
   The signature of `nullif` changed to `nullif(values: ArrayRef, condition: 
BooleanArray) -> Result<ArrayRef>`.
   Possibly the addition of the complement `null_unless`.
   
   I have a draft that I think would work (can open a PR), but wanted to make 
sure that such a kernel is desirable, and understand whether it should use a 
different name to avoid API breakages (`generic_nullif` or something like that).


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