You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2021/06/24 18:58:00 UTC

[jira] [Assigned] (ARROW-13136) [C++] Add a "coalesce" variadic scalar kernel

     [ https://issues.apache.org/jira/browse/ARROW-13136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Li reassigned ARROW-13136:
--------------------------------

    Assignee: David Li

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