[
https://issues.apache.org/jira/browse/SPARK-60962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon updated SPARK-60962:
---------------------------------
Fix Version/s: connect-rust-4.3.0
> Pickle user-defined types of __main__ as UDF return types in Spark Connect
> Rust as PySpark does
> -----------------------------------------------------------------------------------------------
>
> Key: SPARK-60962
> URL: https://issues.apache.org/jira/browse/SPARK-60962
> Project: Spark
> Issue Type: Bug
> Components: Connect
> Affects Versions: connect-rust-4.3.0
> Reporter: Hyukjin Kwon
> Priority: Major
> Fix For: connect-rust-4.3.0
>
>
> In PySpark, a user-defined type that a notebook or script defines, in
> {{__main__}}, can be the return type of a UDF: the UDT instance is pickled
> with cloudpickle, which sends a {{__main__}} class by value. The Rust-backed
> Python client pickles a UDT as its JSON, which the worker rebuilds with
> {{UserDefinedType.fromJson}}: that imports the class by its module, which
> {{__main__}} on the worker does not define, so {{udf(f,
> returnType=PointUDT())}} fails on the worker with {{UNSUPPORTED_OPERATION}},
> and a UDT whose {{__init__}} takes arguments or keeps state is rebuilt
> without them. Pickle a UDT instance as PySpark does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]