Github user e-dorigatti commented on the issue:
https://github.com/apache/spark/pull/21383
I am thinking to use `fail_on_stopiteration` in the worker instead of in
the `UserDefinedFunction`. I don't really like this solution since you have to
fix every other place that uses an udf, but the only way I see to avoid using
`_get_argspec` in `wrap_grouped_map_pandas_udf` is to explicitly pass around a
flag saying whether the function takes one or two arguments, which I also don't
fancy since there's a lot of code to change which I don't know of. I would also
discard `try: f(x) except TypeError: f(x, y)` to see whether the udf takes 1 or
2 arguments, since you never know if the `TypeError` was when calling or inside
`f` itself.. What do you guys suggest?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]