Hi Niranda, Le 13/05/2021 à 21:00, Niranda Perera a écrit :
I am writing a String Reverse kernel [1]. I am extending the arrow::compute::internal::StringTransform class [2] for my impl. StringTransform is expecting the Derived class to implement the following Tranfsform method. bool Transform(const uint8_t* input, offset_type input_string_ncodeunits, uint8_t* output, offset_type* output_written) I believe the output_written pointer expects the Transform method to indicate StringTransform about "the number of bytes written to the output buffer". But in the reverse kernel, this value is predefined (*output_written = input_string_ncodeunits). Would it be useful to specialize StringTransform to handle such cases where input size == output size?
You don't have to reuse StringTransform if another approach would be better (e.g. more performant). The main concerns here would be concision, maintainability, performance (in whatever order).
Regards Antoine.