[
https://issues.apache.org/jira/browse/SPARK-44640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun closed SPARK-44640.
---------------------------------
> Improve error messages for Python UDTF returning non iterable
> -------------------------------------------------------------
>
> Key: SPARK-44640
> URL: https://issues.apache.org/jira/browse/SPARK-44640
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark
> Affects Versions: 3.5.0
> Reporter: Allison Wang
> Assignee: Allison Wang
> Priority: Major
> Fix For: 3.5.1, 4.0.0
>
>
> When the return type of a UDTF is not an iterable, the error message can be
> confusing to users. For example for this UDTF:
> {code:java}
> @udtf(returnType="x: int")
> class TestUDTF:
> def eval(self, a):
> return a {code}
> Currently it fails with this error for regular UDTFs:
> return tuple(map(verify_and_convert_result, res))
> TypeError: 'int' object is not iterable
> And this error for arrow-optimized UDTFs:
> raise ValueError("DataFrame constructor not properly called!")
> ValueError: DataFrame constructor not properly called!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]