You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takuya Ueshin (Jira)" <ji...@apache.org> on 2023/08/02 17:24:00 UTC
[jira] [Assigned] (SPARK-44561) Fix AssertionError when converting UDTF output to a complex type
[ https://issues.apache.org/jira/browse/SPARK-44561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Takuya Ueshin reassigned SPARK-44561:
-------------------------------------
Assignee: (was: Allison Wang)
> 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
> Priority: Major
> Fix For: 4.0.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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org