[
https://issues.apache.org/jira/browse/SPARK-52791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon resolved SPARK-52791.
----------------------------------
Fix Version/s: 4.1.0
(was: 3.5.0)
Resolution: Fixed
Issue resolved by pull request 51475
[https://github.com/apache/spark/pull/51475]
> Inferring a UDT errors when first element is null
> -------------------------------------------------
>
> Key: SPARK-52791
> URL: https://issues.apache.org/jira/browse/SPARK-52791
> Project: Spark
> Issue Type: Bug
> Components: Pandas API on Spark, PS
> Affects Versions: 4.0.0
> Reporter: Peter Nguyen
> Assignee: Peter Nguyen
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.1.0
>
>
> ```
> import pyspark.pandas as ps
> from pyspark.ml.linalg import SparseVector
> sparse_values = \{0: 0.1, 1: 1.1}
> ps_series = ps.Series([None, SparseVector(1, \{0: 1.2}), SparseVector(1, \{0:
> 3})])
> ```
> Error:
> ```
> pyarrow.lib.ArrowInvalid: Could not convert SparseVector(1, \{0: 1.2}) with
> type SparseVector: did not recognize Python value type when inferring an
> Arrow data type
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]