[
https://issues.apache.org/jira/browse/ARROW-9431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17346918#comment-17346918
]
Niranda Perera commented on ARROW-9431:
---------------------------------------
I'd like to take this one. [~jorisvandenbossche] [~uwe] [~apitrou] I'd like to
get your feedback on the following.
Just to be clear, an example of this would be,
{code:java}
// code placeholder
arr1 = [a, b, c, d]
arr2 = [l, m, n, o, p]
to_replace = [0, 2, 3]
res = replace_by_index(to_replace, arr1, arr2)
# res --> [l, b, n, o]
{code}
What is a good name for the kernel? I'm not sure about *replace_by_index*
because Arrays are immutable. Any suggestions?
Can we assume that 'to_replace' is a *non-null* Int64Array?
And should we enforce 'to_replace' being sorted (IMO this would be more
efficient)?
> [C++/Python] Kernel for SetItem(IntegerArray, values)
> -----------------------------------------------------
>
> Key: ARROW-9431
> URL: https://issues.apache.org/jira/browse/ARROW-9431
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++, Python
> Affects Versions: 2.0.0
> Reporter: Uwe Korn
> Priority: Major
>
> We should have a kernel that allows overriding the values of an array using
> an integer array as the indexer and a scalar or array of equal length as the
> values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)