GitHub user dilipbiswal opened a pull request: https://github.com/apache/spark/pull/15495
[SPARK-17620][SQL] Determine Serde by hive.default.fileformat when Creating Hive Serde Tables ## What changes were proposed in this pull request? Reopens the closed PR https://github.com/apache/spark/pull/15190 Make sure the hive.default.fileformat is used to when creating the storage format metadata. Output ``` SQL scala> spark.sql("SET hive.default.fileformat=orc") res1: org.apache.spark.sql.DataFrame = [key: string, value: string] scala> spark.sql("CREATE TABLE tmp_default(id INT)") res2: org.apache.spark.sql.DataFrame = [] ``` Before ```SQL scala> spark.sql("DESC FORMATTED tmp_default").collect.foreach(println) .. [# Storage Information,,] [SerDe Library:,org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe,] [InputFormat:,org.apache.hadoop.hive.ql.io.orc.OrcInputFormat,] [OutputFormat:,org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat,] [Compressed:,No,] [Storage Desc Parameters:,,] [ serialization.format,1,] ``` After ```SQL scala> spark.sql("DESC FORMATTED tmp_default").collect.foreach(println) .. [# Storage Information,,] [SerDe Library:,org.apache.hadoop.hive.ql.io.orc.OrcSerde,] [InputFormat:,org.apache.hadoop.hive.ql.io.orc.OrcInputFormat,] [OutputFormat:,org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat,] [Compressed:,No,] [Storage Desc Parameters:,,] [ serialization.format,1,] ``` ## How was this patch tested? (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests) Added new tests to HiveDDLCommandSuite, SQLQuerySuite You can merge this pull request into a Git repository by running: $ git pull https://github.com/dilipbiswal/spark orc2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/15495.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #15495 ---- commit fe558c3a8355618c516cd182f7a95e5cd9c49934 Author: Dilip Biswal <dbis...@us.ibm.com> Date: 2016-09-21T22:50:29Z [SPARK-17620] hive.default.fileformat=orc does not set OrcSerde commit 9953387f5107732fa09cfa99606a0023c62593c2 Author: Dilip Biswal <dbis...@us.ibm.com> Date: 2016-09-21T23:33:23Z style commit 4830bfca8994087d55da4229ceadd6e2104cf955 Author: Dilip Biswal <dbis...@us.ibm.com> Date: 2016-09-22T01:18:31Z review commit 8c5042bf8df0f8fd858d62fc12ab02fcad9be558 Author: Dilip Biswal <dbis...@us.ibm.com> Date: 2016-10-13T23:50:40Z Add test commit a98e1737346cae3e13ddf6c7e9631588b7837ed6 Author: Dilip Biswal <dbis...@us.ibm.com> Date: 2016-10-14T21:56:20Z adress 2.10 build failure ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org