{"push_id":1513079253,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"3c2ba9fcc493504c9e7d3caf0b93256ca299cbfe","before":"f174cdc7478d0b81f9cfa896284a5ec4c6bb952d","commits":[{"sha":"3c2ba9fcc493504c9e7d3caf0b93256ca299cbfe","author":{"name":"Wenchen Fan","email":"51df79715bab6f96b68cf2b8813ef1aaa5547bdb@databricks.com"},"message":"[SPARK-19305][SQL] partitioned table should always put partition columns at the end of table schema\n\n## What changes were proposed in this pull request?\n\nFor data source tables, we will always reorder the specified table schema, or the query in CTAS, to put partition columns at the end. e.g. `CREATE TABLE t(a int, b int, c int, d int) USING parquet PARTITIONED BY (d, b)` will create a table with schema `<a, c, d, b>`\n\nHive serde tables don't have this problem before, because its CREATE TABLE syntax specifies data schema and partition schema individually.\n\nHowever, after we unifed the CREATE TABLE syntax, Hive serde table also need to do the reorder. This PR puts the reorder logic in a analyzer rule,  which works with both data source tables and Hive serde tables.\n\n## How was this patch tested?\n\nnew regression test\n\nAuthor: Wenchen Fan <wenchen@databricks.com>\n\nCloses #16655 from cloud-fan/schema.","distinct":true,"url":"https://api.github.com/repos/dongjoon-hyun/spark/commits/3c2ba9fcc493504c9e7d3caf0b93256ca299cbfe"}]}
{"actor":{"display_login":"dongjoon-hyun"}}