[ 
https://issues.apache.org/jira/browse/SPARK-14218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15215098#comment-15215098
 ] 

Suresh Thalamati commented on SPARK-14218:
------------------------------------------

I am giving a shot at  submitting PR  for this issue. 

> dataset show() does not display column names in the correct order if 
> underlying data frame schema order is different from the encoder schema 
> order. 
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-14218
>                 URL: https://issues.apache.org/jira/browse/SPARK-14218
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Suresh Thalamati
>
> dataset show does not output column names correctly if the encoder schema 
> order is different from the the underlying data frame schema order. 
> Repro :
> {code}
> case class emp(id: Int, name:String)
> val df = sqlContext.sql("select 'Mike', 2").toDF("name", "id")
val ds = 
> df.as[emp]


> +----+----+

> |name|  id|
> 
+----+----+

> |   2|Mike|

> +----+----+{code}
> Output Column names should  be  “id , name” to match with data correctly.
> This works correctly in spark 1.6 .  Output in spark 1.6:
> {code}
> scala> ds.show
> +---+----+
> | id|name|
> +---+----+
> |  2|Mike|
> +---+----+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to