[
https://issues.apache.org/jira/browse/ARROW-13136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17383603#comment-17383603
]
Ian Cook commented on ARROW-13136:
----------------------------------
This kernel currently converts dictionaries to strings. Are there any other
type limitations to note?
> [C++] Add a "coalesce" variadic scalar kernel
> ---------------------------------------------
>
> Key: ARROW-13136
> URL: https://issues.apache.org/jira/browse/ARROW-13136
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Ian Cook
> Assignee: David Li
> Priority: Major
> Labels: pull-request-available
> Fix For: 5.0.0
>
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> 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:
> {code:java}
> Array<int32> Array<int32> Array<int32>
> [ [ [
> null, 2, 3,
> 4, null, 6,
> null, null, 9,
> null null null
> ] ] ]
> {code}
> and return output:
> {code:java}
> Array<int32>
> [
> 2,
> 4,
> 9,
> null
> ]
> {code}
> This should accept scalars and recycle their values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)