You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mrinal Kanti Sardar (JIRA)" <ji...@apache.org> on 2019/03/18 16:29:00 UTC

[jira] [Resolved] (SPARK-27191) union of dataframes depends on order of the columns in 2.4.0

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

Mrinal Kanti Sardar resolved SPARK-27191.
-----------------------------------------
       Resolution: Not A Bug
    Fix Version/s: 2.3.0

Explained

> union of dataframes depends on order of the columns in 2.4.0
> ------------------------------------------------------------
>
>                 Key: SPARK-27191
>                 URL: https://issues.apache.org/jira/browse/SPARK-27191
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Mrinal Kanti Sardar
>            Priority: Major
>             Fix For: 2.3.0
>
>
> Thought this issue was resolved in 2.3.0 according to https://issues.apache.org/jira/browse/SPARK-22335 but I still faced this in 2.4.0.
> {code:java}
> >>> df_1 = spark.createDataFrame([["1aa", "1bbbbbbb"]], ["col1", "col2"])
> >>> df_1.show()
> +----+--------+
> |col1| col2|
> +----+--------+
> | 1aa|1bbbbbbb|
> +----+--------+
> >>> df_2 = spark.createDataFrame([["2bbbbbbb", "2aa"]], ["col2", "col1"])
> >>> df_2.show()
> +--------+----+
> | col2|col1|
> +--------+----+
> |2bbbbbbb| 2aa|
> +--------+----+
> >>> df_u = df_1.union(df_2)
> >>> df_u.show()
> +--------+--------+
> | col1| col2|
> +--------+--------+
> | 1aa|1bbbbbbb|
> |2bbbbbbb| 2aa|
> +--------+--------+
> >>> spark.version
> '2.4.0'
> >>>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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