[ https://issues.apache.org/jira/browse/SPARK-14218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-14218: ------------------------------------ Assignee: (was: Apache Spark) > 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