Hi all,

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?

Best

[1] https://issues.apache.org/jira/browse/ARROW-12713
[2]
https://github.com/apache/arrow/blob/325eb073e0fb6971f3dd027299d37850377b39ea/cpp/src/arrow/compute/kernels/scalar_string.cc#L137
-- 
Niranda Perera
https://niranda.dev/
@n1r44 <https://twitter.com/N1R44>

Reply via email to