rtpsw commented on code in PR #14043: URL: https://github.com/apache/arrow/pull/14043#discussion_r983880820
########## cpp/src/arrow/compute/function.h: ########## @@ -159,6 +159,20 @@ struct ARROW_EXPORT FunctionDoc { static const FunctionDoc& Empty(); }; +/// \brief An executor of a function with a preconfigured kernel +struct ARROW_EXPORT FunctionExecutor { + virtual ~FunctionExecutor() = default; + /// \brief Initialize a preconfigured kernel + /// + /// This method may be called zero or more times. By default, the kernel is initialized + /// with default function options and exec context. Review Comment: Here, one case "by default" refers to is when `FunctionExecutor.Init(...)` has not been invoked at all. In this case, the kernel will be initialized with the default function options (or error, if these do not exist) and exec context. The default function options would also be used if `FunctionExecutor.Init(...)` were (last) invoked with a null function options argument. Now, `GetFunctionExecutor` is a one-shot function that always invokes `FunctionExecutor.Init(...)` internally, possibly with a null function options argument. So, the above defaulting behavior of the function options occurs when `FunctionExecutor` is used directly, either not invoking `Init` at all or invoking `Init` with a null function options argument, and when `GetFunctionExecutor` is invoked with a null function options argument. Since you asked, I understand this may not be clear from the doc, but I'm not sure how to write it more clearly, at least not in a short way. What would you suggest the doc should be? -- 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