jorisvandenbossche commented on pull request #9024: URL: https://github.com/apache/arrow/pull/9024#issuecomment-754822330
> "setitem" is confusing to me (I would expect something where you pass indices and values to set at those indices). That's https://issues.apache.org/jira/browse/ARROW-9431. There could be a variant of "setitem" that takes integer indices, and one that takes a boolean mask? But it's true that for a "setitem" kernel, you would expect the "values to set" (`Replacement` in the example in the top post) to be of the length of the number of values that get set, not of the same length as the original array. So what this PR proposes, is actually more a "where" kernel (using numpy's terminology), for which we have https://issues.apache.org/jira/browse/ARROW-10640. There is some discussion on that PR that this can be generalized to something like numpy's `np.choose`. And the `np.select` mentioned by @pitrou is quite related to that as well (the exact semantics are a bit different between both: `select` uses boolean conditions to choose between the arrays, `choose` a single array of indices into the choice arrays) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org