refactor(bigframes): Simplify @udf wrapper object by TrevorBergeron · Pull Request #16556 · googleapis/google-cloud-python

Code Review

This pull request refactors the User Defined Function (UDF) infrastructure by introducing a Udf protocol and a UdfRoutine dataclass, effectively consolidating the handling of BigQuery routines and removing the BigqueryCallableRowRoutine class. Code throughout the library now utilizes isinstance(..., Udf) for type checking. Furthermore, the system tests for managed functions have been significantly updated to use a pytest fixture for more reliable resource cleanup. Feedback was provided regarding the incorrect use of @functools.partial as a decorator on the UdfRoutine.__call__ method, which should be removed.