You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/06/23 10:17:00 UTC
[jira] [Assigned] (SPARK-21191) DataFrame Row StructType check
duplicate name
[ https://issues.apache.org/jira/browse/SPARK-21191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-21191:
------------------------------------
Assignee: Apache Spark
> DataFrame Row StructType check duplicate name
> ---------------------------------------------
>
> Key: SPARK-21191
> URL: https://issues.apache.org/jira/browse/SPARK-21191
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.0.0, 2.0.2, 2.1.1
> Reporter: darion yaphet
> Assignee: Apache Spark
>
> Currently , when we create a dataframe with *toDF(columns:String)* or describe from *StructType* can't avoid have duplicated name .
> {code:scala}
> val dataset = Seq(
> (0, 3, 4),
> (0, 4, 3),
> (0, 5, 2),
> (1, 3, 3),
> (1, 5, 6),
> (1, 4, 2),
> (2, 3, 5),
> (2, 5, 4),
> (2, 4, 3)
> ).toDF("1", "1", "2").show
> {code}
> {code}
> +---+---+---+
> | 1| 1| 2|
> +---+---+---+
> | 0| 3| 4|
> | 0| 4| 3|
> | 0| 5| 2|
> | 1| 3| 3|
> | 1| 5| 6|
> | 1| 4| 2|
> | 2| 3| 5|
> | 2| 5| 4|
> | 2| 4| 3|
> +---+---+---+
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org