icexelloss commented on code in PR #36673:
URL: https://github.com/apache/arrow/pull/36673#discussion_r1272280533
##########
python/pyarrow/_compute.pyx:
##########
@@ -2789,6 +2794,83 @@ def register_scalar_function(func, function_name,
function_doc, in_types, out_ty
out_type, func_registry)
+def register_vector_function(func, function_name, function_doc, in_types,
out_type,
+ func_registry=None):
+ """
+ Register a user-defined vector function.
+
+ This API is EXPERIMENTAL.
+
+ A vector function is a function that executes vector
+ operations on arrays. Unlike scalar function, vector
+ function often has a grouping semantics and the output
+ for a row depends on other rows. A typical example
+ of vector function is "rank".
Review Comment:
> I'm just wondering if we can describe vector functions not as "a function
whose output depends on other rows" (since this is the definition of window
functions) but as "a function whose output may depend on other rows and whose
output length does not need to be the same as the input length".
I think I understand what you are saying. N -> N with grouping semantics has
been traditional called "window functions" and I am fine with reserving the
word "window function" so I agree we can make vector function description more
specific. I will make the change to the doc.
--
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]