rtpsw commented on code in PR #14043:
URL: https://github.com/apache/arrow/pull/14043#discussion_r965843255
##########
cpp/src/arrow/compute/function.h:
##########
@@ -159,6 +159,14 @@ struct ARROW_EXPORT FunctionDoc {
static const FunctionDoc& Empty();
};
+/// \brief An executor of a function with a preconfigured kernel
+struct ARROW_EXPORT FunctionExecutor {
+ virtual ~FunctionExecutor() {}
+ /// \brief Execute the preconfigured kernel with arguments that must fit it
+ virtual Result<Datum> Execute(const std::vector<Datum>& args,
+ int64_t passed_length = -1) = 0;
Review Comment:
As code now, both the exec context and the function options are used in
kernel initialization, in `FunctionExecutorImpl.Init`. If both are moved to
kernel execution, then kernel initialization would be invoked on each
execution, which IIRC is not good for my UDF purposes. I guess we could
separate kernel resolution from kernel initialization, and allow a choice if
which one would be reused across executions.
--
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]