You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API
### What changes were proposed in this pull request?
Fixes Python UDTF with named table arguments in DataFrame API.
### Why are the changes needed?
Named table arguments fails with the following error:
```py
>>> from pyspark.sql.functions import *
>>>
>>> udtf(returnType="x string")
... class TestUDTF:
... def eval(self, x):
... yield str(x),
...
>>> TestUDTF(x=spark.range(10).asTable()).show()
Traceback (most recent call last):
...
py4j.Py4JException: Method namedArgumentExpression([class java.lang.String, class org.apache.spark.sql.TableArg]) does not exist
...
```
Also, Spark Connect doesn't recognize table arguments in `analyze`.
### Does this PR introduce _any_ user-facing change?
Yes, named table arguments will be available in DataFrame API.
### How was this patch tested?
Added the related tests.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#52171 from ueshin/issues/SPARK-53431/named_table_arguments.
Authored-by: Takuya Ueshin <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
0 commit comments