pitrou commented on a change in pull request #11918:
URL: https://github.com/apache/arrow/pull/11918#discussion_r786139689
##########
File path: python/pyarrow/_compute.pyx
##########
@@ -2019,6 +2019,25 @@ cdef class Expression(_Weakrefable):
return (<Expression> expr)
return (<Expression> Expression._scalar(expr))
+ @staticmethod
+ def _call_function(str function_name, arguments,
+ FunctionOptions options=None):
+ cdef:
+ vector[CExpression] c_arguments
+ shared_ptr[CFunctionOptions] c_options=(
+ <shared_ptr[CFunctionOptions]> nullptr)
+
+ for argument in arguments:
+ if not isinstance(argument, Expression):
+ raise TypeError("only other expressions allowed as arguments")
+ c_arguments.push_back((<Expression> argument).expr)
+
+ # if options is not None:
+ # c_options = make_shared[CFunctionOptions](options.get_options())
Review comment:
You should probably replace the `unique_ptr` in the FunctionOptions
declaration with a `shared_ptr`.
--
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]