You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/12 13:25:14 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #7418: ARROW-9115: [C++] Implementation of ascii_lower/ascii_upper by processing input data buffers in batch

pitrou commented on a change in pull request #7418:
URL: https://github.com/apache/arrow/pull/7418#discussion_r439415981



##########
File path: cpp/src/arrow/compute/kernels/scalar_string.cc
##########
@@ -37,26 +37,108 @@ struct AsciiLength {
   }
 };
 
-struct AsciiUpper {
-  // XXX: the Scalar codegen path passes template arguments that are unused
-  template <typename... Ignored>
-  static std::string Call(KernelContext*, const util::string_view& val) {
-    std::string result = val.to_string();
-    std::transform(result.begin(), result.end(), result.begin(),
-                   [](unsigned char c) { return std::toupper(c); });
-    return result;
+using TransformFunc = std::function<void(const uint8_t*, int64_t, uint8_t*)>;
+
+void StringDataTransform(KernelContext* ctx, const ExecBatch& batch,

Review comment:
       Most everything should be under the anonymous namespace in this file.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org