js8544 commented on code in PR #35787:
URL: https://github.com/apache/arrow/pull/35787#discussion_r1245360012


##########
cpp/src/arrow/compute/kernel.h:
##########
@@ -283,7 +283,12 @@ class ARROW_EXPORT OutputType {
   ///
   /// This function SHOULD _not_ be used to check for arity, that is to be
   /// performed one or more layers above.
-  using Resolver = Result<TypeHolder> (*)(KernelContext*, const 
std::vector<TypeHolder>&);
+  using Resolver =
+      std::function<Result<TypeHolder>(KernelContext*, const 
std::vector<TypeHolder>&)>;
+
+  // For backward compatibility
+  using ResolverFuncPtr = Result<TypeHolder> (*)(KernelContext*,
+                                                 const 
std::vector<TypeHolder>&);

Review Comment:
   To reuse subtract's output resolver, I would have to change Resolver to 
std::function because I need a capturing lambda which cannot be converted to a 
function pointer.



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to