progval opened a new issue, #1516: URL: https://github.com/apache/datafusion-python/issues/1516
**Describe the bug** Here: https://github.com/apache/datafusion-python/blob/e0284c6e788b6fc893495ed929b9badef1cf925c/python/datafusion/user_defined.py#L36 we bind `_R` to be a subtype of `pyarrow.DataType` And in these two places we require that functions return a value of type `_R` (ie. they should return a pyarrow datatype): https://github.com/apache/datafusion-python/blob/e0284c6e788b6fc893495ed929b9badef1cf925c/python/datafusion/user_defined.py#L123-L130 https://github.com/apache/datafusion-python/blob/e0284c6e788b6fc893495ed929b9badef1cf925c/python/datafusion/user_defined.py#L166-L174 which seems incorrect, as functions should return *arrays* that contain values of that type **To Reproduce** ``` datafusion-python ((53.0.0)) $ mypy examples/python-udf.py examples/python-udf.py:27: error: Value of type variable "_R" of function cannot be "Array[Any]" [type-var] Found 1 error in 1 file (checked 1 source file) ``` **Expected behavior** mypy should pass **Additional context** -- 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]
