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

Apache Spark commented on SPARK-42269:
--------------------------------------

User 'xinrong-meng' has created a pull request for this issue:
https://github.com/apache/spark/pull/39964

> Support complex return types in DDL strings
> -------------------------------------------
>
>                 Key: SPARK-42269
>                 URL: https://issues.apache.org/jira/browse/SPARK-42269
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Connect, PySpark
>    Affects Versions: 3.4.0
>            Reporter: Xinrong Meng
>            Priority: Major
>
> {code}
> # Spark Connect
> >>> spark.range(2).select(udf(lambda x: (x, x), "struct<x:integer, 
> >>> y:integer>")("id"))
> ...
> AssertionError: returnType should be singular
> # vanilla PySpark
> >>> spark.range(2).select(udf(lambda x: (x, x), "struct<x:integer, 
> >>> y:integer>")("id"))
> DataFrame[<lambda>(id): struct<x:int,y:int>]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to