edponce commented on a change in pull request #11233:
URL: https://github.com/apache/arrow/pull/11233#discussion_r717266869



##########
File path: cpp/src/arrow/compute/kernels/scalar_string.cc
##########
@@ -2201,11 +2201,11 @@ void AddSplitWhitespaceAscii(FunctionRegistry* 
registry) {
   auto func =
       std::make_shared<ScalarFunction>("ascii_split_whitespace", 
Arity::Unary(),
                                        &ascii_split_whitespace_doc, 
&default_options);
-  using t32 = SplitWhitespaceAsciiExec<StringType, ListType>;
-  using t64 = SplitWhitespaceAsciiExec<LargeStringType, ListType>;
-  DCHECK_OK(func->AddKernel({utf8()}, {list(utf8())}, t32::Exec, 
t32::State::Init));
-  DCHECK_OK(
-      func->AddKernel({large_utf8()}, {list(large_utf8())}, t64::Exec, 
t64::State::Init));
+
+  for (const auto& ty : StringTypes()) {
+    auto exec = GenerateTypeAgnosticVarBinary<SplitWhitespaceAsciiExec, 
ListType>(ty);
+    DCHECK_OK(func->AddKernel({ty}, {list(ty)}, exec, SplitState::Init));
+  }

Review comment:
       Based on [Zulip 
discussion](https://ursalabs.zulipchat.com/#narrow/stream/180245-dev/topic/Stringlike.20kernels.20on.20binary.20data),
 we may support binary types for ASCII-named compute functions.




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