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

Apache Spark reassigned SPARK-41810:
------------------------------------

    Assignee: Apache Spark

> SparkSession.createDataFrame does not respect the column names in the 
> dictionary
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-41810
>                 URL: https://issues.apache.org/jira/browse/SPARK-41810
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Connect
>    Affects Versions: 3.4.0
>            Reporter: Hyukjin Kwon
>            Assignee: Apache Spark
>            Priority: Major
>
> {code}
> Failed example:
>     with tempfile.TemporaryDirectory() as d:
>         # Write a DataFrame into a JSON file
>         spark.createDataFrame(
>             [{"age": 100, "name": "Hyukjin Kwon"}]
>         ).write.mode("overwrite").format("json").save(d)
>         # Read the JSON file as a DataFrame.
>         spark.read.format('json').load(d).show()
> Expected:
>     +---+------------+
>     |age|        name|
>     +---+------------+
>     |100|Hyukjin Kwon|
>     +---+------------+
> Got:
>     +---+------------+
>     | _1|          _2|
>     +---+------------+
>     |100|Hyukjin Kwon|
>     +---+------------+
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to