You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xinrong Meng (Jira)" <ji...@apache.org> on 2023/02/10 06:16:00 UTC
[jira] [Updated] (SPARK-42269) Support complex return types in DDL strings
[ https://issues.apache.org/jira/browse/SPARK-42269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xinrong Meng updated SPARK-42269:
---------------------------------
Summary: Support complex return types in DDL strings (was: Support user-specified return type as a collection DataType in DDL strings)
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org