You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Suresh Thalamati (JIRA)" <ji...@apache.org> on 2016/07/19 18:54:20 UTC
[jira] [Resolved] (SPARK-14218) dataset show() does not display
column names in the correct order if underlying data frame schema order is
different from the encoder schema order.
[ https://issues.apache.org/jira/browse/SPARK-14218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Suresh Thalamati resolved SPARK-14218.
--------------------------------------
Resolution: Duplicate
verified on 2.0 , and trunk. This issue is resolved.
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org