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

Sean Owen resolved SPARK-21191.
-------------------------------
    Resolution: Duplicate

> 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
>
> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to