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/03/29 01:37:25 UTC
[jira] [Created] (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.
Suresh Thalamati created SPARK-14218:
----------------------------------------
Summary: 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