[ 
https://issues.apache.org/jira/browse/ARROW-9432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17159023#comment-17159023
 ] 

Uwe Korn commented on ARROW-9432:
---------------------------------

{quote}In R, negative indices means to take everything except those indices. So 
maybe these behaviors should be handled in Python/R, translating the requested 
indices to the "normal" form that the C++ library expects?{quote}

Uh, how would that work? I thought we have a 1:1 mapping of index in the array 
to a resulting row.

{quote}We should not alter the existing Take implementation hot path.
{quote}

I would rather have a second kernel implementation that is called if one 
requests the treatment of negative integers in this way. As one can see, I have 
opened two of these "behave-different-on-negative-indices" issues and R seems 
to have a third implementation. This shows that these kernels are useful but 
that there is no consensus on what they should do.


> [C++/Python] Add option to Take kernel to interpret negative indices as 
> indexing from the right
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARROW-9432
>                 URL: https://issues.apache.org/jira/browse/ARROW-9432
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++, Python
>            Reporter: Uwe Korn
>            Priority: Major
>             Fix For: 2.0.0
>
>
> Currently negative integers are explicitly forbidding in the {{Take}} kernel. 
> It would be nice to have the option to treat negative integers as "indices 
> from the right" instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to