diff options
author | gatorsmile <gatorsmile@gmail.com> | 2016-08-10 17:05:50 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2016-08-10 17:05:50 +0800 |
commit | 2b10ebe6ac1cdc2c723cb47e4b88cfbf39e0de08 (patch) | |
tree | 0e285bc9ea7c67c0760fdab0da5e915fdcf42f25 /scalastyle-config.xml | |
parent | 41a7dbdd34d2641d42eb00828f16285089356aa9 (diff) | |
download | spark-2b10ebe6ac1cdc2c723cb47e4b88cfbf39e0de08.tar.gz spark-2b10ebe6ac1cdc2c723cb47e4b88cfbf39e0de08.tar.bz2 spark-2b10ebe6ac1cdc2c723cb47e4b88cfbf39e0de08.zip |
[SPARK-16185][SQL] Better Error Messages When Creating Table As Select Without Enabling Hive Support
#### What changes were proposed in this pull request?
When we do not turn on the Hive Support, the following query generates a confusing error message by Planner:
```Scala
sql("CREATE TABLE t2 SELECT a, b from t1")
```
```
assertion failed: No plan for CreateTable CatalogTable(
Table: `t2`
Created: Tue Aug 09 23:45:32 PDT 2016
Last Access: Wed Dec 31 15:59:59 PST 1969
Type: MANAGED
Provider: hive
Storage(InputFormat: org.apache.hadoop.mapred.TextInputFormat, OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat)), ErrorIfExists
+- Relation[a#19L,b#20L] parquet
java.lang.AssertionError: assertion failed: No plan for CreateTable CatalogTable(
Table: `t2`
Created: Tue Aug 09 23:45:32 PDT 2016
Last Access: Wed Dec 31 15:59:59 PST 1969
Type: MANAGED
Provider: hive
Storage(InputFormat: org.apache.hadoop.mapred.TextInputFormat, OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat)), ErrorIfExists
+- Relation[a#19L,b#20L] parquet
```
This PR is to issue a better error message:
```
Hive support is required to use CREATE Hive TABLE AS SELECT
```
#### How was this patch tested?
Added test cases in `DDLSuite.scala`
Author: gatorsmile <gatorsmile@gmail.com>
Closes #13886 from gatorsmile/createCatalogedTableAsSelect.
Diffstat (limited to 'scalastyle-config.xml')
0 files changed, 0 insertions, 0 deletions