-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Add a variadic scalar compute kernel that works like the SQL coalesce function. It should take arbitrarily many inputs of the same or compatible types and process them row-wise, returning the first non-null value in each row, or returning null if there are no non-null values in the row.
For example, in the case of 3 integer-type input arrays, this would take inputs:
Array<int32> Array<int32> Array<int32>
[ [ [
null, 2, 3,
4, null, 6,
null, null, 9,
null null null
] ] ]and return output:
Array<int32>
[
2,
4,
9,
null
] This should accept scalars and recycle their values.
Reporter: Ian Cook / @ianmcook
Assignee: David Li / @lidavidm
Related issues:
- [C++][Doc] Rename project to make_struct in docs (fixes)
- [C++][Compute] Consolidate fill_null and coalesce (is duplicated by)
- [C++] Improve type support for 'coalesce' kernel (is related to)
- [R] Add binding for coalesce() (is depended upon by)
PRs and other links:
Note: This issue was originally created as ARROW-13136. Please see the migration documentation for further details.