ZhangHuiGui commented on code in PR #40687:
URL: https://github.com/apache/arrow/pull/40687#discussion_r1534094415
##########
cpp/src/arrow/compute/function.cc:
##########
@@ -426,6 +426,7 @@ Status ScalarFunction::AddKernel(ScalarKernel kernel) {
if (arity_.is_varargs && !kernel.signature->is_varargs()) {
return Status::Invalid("Function accepts varargs but kernel signature does
not");
}
+ kernel.is_pure = is_pure();
Review Comment:
The is_pure property need to be used in kernel's execute. I'm not sure
should we add kernel.is_pure to scalarkernel's constructor, because there is a
second way to emplace_back kernels_ in another AddKernel?
But actually the current way is used in only built-in impure functions
(random) :).
--
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]