edponce commented on pull request #11023:
URL: https://github.com/apache/arrow/pull/11023#issuecomment-907701399


   @lidavidm Those `ArrayBuilder` methods do work to perform this operation but 
will require not following the common approach used for string kernels based on 
the already provided [`StringTransformXXX` 
infrastructure](https://github.com/edponce/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string.cc#L314).
 Specifically, it would require overriding 
[`ExecArray()`](https://github.com/edponce/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string.cc#L327)
 (while duplicating most of it). For how things currently are, I think using 
the `ArrayBuilder/MakeScalar` methods for `StrRepeat` is not preferable.
   
   The current `StrRepeat` implementation only allocates once the entire array 
for all repeated strings via 
[`ExecArray()`](https://github.com/edponce/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string.cc#L335-L343).
 `StrRepeat` overrides `MaxCodeunits()` to return `input_ncodeunits * 
n_repeats`.


-- 
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]


Reply via email to