You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2023/03/08 00:37:00 UTC

[jira] [Resolved] (SPARK-42022) createDataFrame should autogenerate missing column names

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

Hyukjin Kwon resolved SPARK-42022.
----------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

Issue resolved by pull request 40310
[https://github.com/apache/spark/pull/40310]

> createDataFrame should autogenerate missing column names
> --------------------------------------------------------
>
>                 Key: SPARK-42022
>                 URL: https://issues.apache.org/jira/browse/SPARK-42022
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Connect
>    Affects Versions: 3.4.0
>            Reporter: Hyukjin Kwon
>            Assignee: Hyukjin Kwon
>            Priority: Major
>             Fix For: 3.4.0
>
>
> {code}
> pyspark/sql/tests/test_types.py:233 (TypesParityTests.test_infer_schema_not_enough_names)
> ['col1', '_2'] != ['col1']
> Expected :['col1']
> Actual   :['col1', '_2']
> <Click to see difference>
> self = <pyspark.sql.tests.connect.test_parity_types.TypesParityTests testMethod=test_infer_schema_not_enough_names>
>     def test_infer_schema_not_enough_names(self):
>         df = self.spark.createDataFrame([["a", "b"]], ["col1"])
> >       self.assertEqual(df.columns, ["col1", "_2"])
> ../test_types.py:236: AssertionError
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org