kosiew commented on code in PR #1287:
URL: 
https://github.com/apache/datafusion-python/pull/1287#discussion_r2454625911


##########
python/datafusion/user_defined.py:
##########
@@ -164,10 +270,13 @@ def udf(*args: Any, **kwargs: Any):  # noqa: D417
                 backed ScalarUDF within a PyCapsule, you can pass this 
parameter
                 and ignore the rest. They will be determined directly from the
                 underlying function. See the online documentation for more 
information.
-            input_types (list[pa.DataType]): The data types of the arguments
-                to ``func``. This list must be of the same length as the 
number of
-                arguments.
-            return_type (_R): The data type of the return value from the 
function.
+                The callable should accept and return :class:`pyarrow.Array` or
+                :class:`pyarrow.ChunkedArray` values.
+            input_types (list[pa.DataType | pa.Field]): The argument types for 
``func``.
+                This list must be of the same length as the number of 
arguments. Pass
+                :class:`pyarrow.Field` instances to preserve extension 
metadata.
+            return_type (pa.DataType | pa.Field): The return type of the 
function. Use a
+                :class:`pyarrow.Field` to preserve metadata on extension 
arrays.

Review Comment:
   Amended.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to