Skip to content

Conversation

mwylde
Copy link
Member

@mwylde mwylde commented Sep 6, 2024

This PR lands the first support for Python UDFs in Arroyo! Initially supported are synchronous (i.e., quick-running) scalar UDFs that take python-native arguments (as opposed to Arrow arrays). Python UDFs that operate directly on Arrow and support for long-running UDFs will follow.

A Python UDF in Arroyo looks like this:

from arroyo_udf import udf

@udf
def my_py_add(x: int, y: int) -> int:
    return x + y

and then can be used like any scalar function

select my_py_add(x, y) from events

Currently, Python UDFs will not work in our Docker containers as they do not host a Python environment.

@mwylde mwylde merged commit 099f851 into master Sep 9, 2024
6 checks passed
@mwylde mwylde deleted the python_udfs branch September 9, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant