[
https://issues.apache.org/jira/browse/SPARK-62258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon reassigned SPARK-62258:
------------------------------------
Assignee: Hyukjin Kwon
> Convert the local data of createDataFrame under a type subclass that
> overrides what PySpark's LocalDataToArrowConversion reads, as PySpark does
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SPARK-62258
> URL: https://issues.apache.org/jira/browse/SPARK-62258
> Project: Spark
> Issue Type: Improvement
> Components: Connect
> Affects Versions: 5.0.0
> Reporter: Hyukjin Kwon
> Assignee: Hyukjin Kwon
> Priority: Major
> Labels: pull-request-available
>
> PySpark 4.3.0 converts the local data of createDataFrame (rows, tuples,
> dicts, ndarrays) through LocalDataToArrowConversion, which reads the
> attributes of the schema's types as Python reads them, so a type subclass
> that overrides them changes the conversion. The Python client converts such
> data by its native types and sends their JSON. For example, with a
> StructField subclass FieldStr whose dataType property gives StringType over
> `a long`, [(1,)] gives struct<a:string> [Row(a='1')] on PySpark and
> struct<a:bigint> [Row(a=1)] on the client, and [('x',)] gives Row(a='x') on
> PySpark and ArrowInvalid on the client. Convert it 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]