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

Ian Cook updated ARROW-13136:
-----------------------------
    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:
{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.

  was:
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 also accept scalar values and recycle their values.


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

Reply via email to