edponce commented on pull request #11023: URL: https://github.com/apache/arrow/pull/11023#issuecomment-908250449
The current `StringTransformXXX` classes do not easily support non-scalar options. In this PR, we want to be able to do the following: ```python str_repeat(['a', 'b', 'c'], repeats=[1,2,3]) # ['a', 'bb', 'ccc'] ``` *Possible solution:* Override the [`ExecArray` of `StringTransformExecBase`](https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string.cc#L327) and specialize for kernels that require the current index of the input string. This is done by passing the string index to the [`transform->Transform(..., i)` call](https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string.cc#L355-L356). We need to keep in mind that these indexes are relative to the current `ExecBatch` so we need to offset accordingly. cc @pitrou @lidavidm -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
