You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "darion yaphet (JIRA)" <ji...@apache.org> on 2017/06/23 09:27:00 UTC
[jira] [Created] (SPARK-21191) DataFrame Row StructType check
duplicate name
darion yaphet created SPARK-21191:
-------------------------------------
Summary: 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.1.1, 2.0.2, 2.0.0
Reporter: darion yaphet
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