edponce commented on a change in pull request #10869:
URL: https://github.com/apache/arrow/pull/10869#discussion_r700403299
##########
File path: cpp/src/arrow/compute/kernels/scalar_string.cc
##########
@@ -527,6 +520,36 @@ struct Utf8CapitalizeTransform : public
StringTransformBase {
template <typename Type>
using Utf8Capitalize = StringTransformExec<Type, Utf8CapitalizeTransform>;
+struct Utf8TitleTransform : public StringTransformCodepointBase {
+ int64_t Transform(const uint8_t* input, int64_t input_string_ncodeunits,
+ uint8_t* output) {
+ uint8_t* output_start = output;
+ uint32_t (*TransformCodepoint)(uint32_t) =
UTF8UpperTransform::TransformCodepoint;
Review comment:
I used function pointer to simplify code, but you are right that adding
an unnecessary level of indirection is not the way to go. Lesson learned.
--
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]