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/01 05:52:00 UTC
[jira] [Created] (SPARK-42269) Support user-specified return type as a collection DataType
Xinrong Meng created SPARK-42269:
------------------------------------
Summary: Support user-specified return type as a collection DataType
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
{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