-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
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).