[ 
https://issues.apache.org/jira/browse/SPARK-44640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17761038#comment-17761038
 ] 

Ignite TC Bot commented on SPARK-44640:
---------------------------------------

User 'allisonwang-db' has created a pull request for this issue:
https://github.com/apache/spark/pull/42726

> 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: 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to