[
https://issues.apache.org/jira/browse/SPARK-44561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Takuya Ueshin resolved SPARK-44561.
-----------------------------------
Fix Version/s: 3.5.0
Assignee: Takuya Ueshin
Resolution: Fixed
Issue resolved by pull request 42310
https://github.com/apache/spark/pull/42310
> Fix AssertionError when converting UDTF output to a complex type
> ----------------------------------------------------------------
>
> Key: SPARK-44561
> URL: https://issues.apache.org/jira/browse/SPARK-44561
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark
> Affects Versions: 3.5.0
> Reporter: Allison Wang
> Assignee: Takuya Ueshin
> Priority: Major
> Fix For: 3.5.0
>
>
> {code:java}
> class TestUDTF:
> def eval(self):
> yield {'a': 1, 'b': 2},
> udtf(TestUDTF, returnType="x: map<string,int>")().show() {code}
> This will fail with:
> File "pandas/_libs/lib.pyx", line 2834, in pandas._libs.lib.map_infer
> File "python/pyspark/sql/pandas/types.py", line 804, in convert_map
> assert isinstance(value, dict)
> AssertionError
> Same for `convert_struct`
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]