You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/10/07 08:19:00 UTC

[jira] [Created] (ARROW-17960) [C++] Add kernel for slicing list values

Joris Van den Bossche created ARROW-17960:
---------------------------------------------

             Summary: [C++] Add kernel for slicing list values
                 Key: ARROW-17960
                 URL: https://issues.apache.org/jira/browse/ARROW-17960
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Joris Van den Bossche


This would be a scalar kernel "List<T> -> List<T>" (or to fixed size list?), where you can subset the values in each list element. 

So for example, giving the list array:

{code}
arr = pa.array([[1, 2, 3], [4, 5, 6, 7], [8, 9]])
{code}

we could do something like the following to get the first two elements of each list:

{code}
pc.list_slice(arr, start=0, stop=2)
->  pa.array([[1, 2], [4, 5], [8, 9]])
{code}

This would supplement the existing {{list_element}} kernel.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)