[ 
https://issues.apache.org/jira/browse/SPARK-35929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon reassigned SPARK-35929:
------------------------------------

    Assignee: Haejoon Lee

> Schema inference of nested structs defaults to map
> --------------------------------------------------
>
>                 Key: SPARK-35929
>                 URL: https://issues.apache.org/jira/browse/SPARK-35929
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 3.2.0
>            Reporter: Haejoon Lee
>            Assignee: Haejoon Lee
>            Priority: Major
>
> Inferring schema for struct columns causing schema issues as below.
> {code:java}
> data = [{"inside_struct": {"payment": 100.5, "name": "Lee"}}]
> df = spark.createDataFrame(data)
> df.show()
> +--------------------+
> |       inside_struct|
> +--------------------+
> |{name -> null, pa...|
> +--------------------+
> {code}
> The "inside_struct" is a map, and the "name" column inside of it becomes null.
> The schema inferring might decide on a map type with a value type of the 
> first field of the struct, we should fix it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to