aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/compatibility/src/test
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2016-05-11 15:30:53 -0700
committerYin Huai <yhuai@databricks.com>2016-05-11 15:30:53 -0700
commit8881765ac7ac6ba6fe9ef0d0a669c08cca58ed93 (patch)
treece398e3546ea551450856ba8397958b5175b325a /sql/hive/compatibility/src/test
parent40ba87f769ab03721d01c7960b89a8c414fcfbca (diff)
downloadspark-8881765ac7ac6ba6fe9ef0d0a669c08cca58ed93.tar.gz
spark-8881765ac7ac6ba6fe9ef0d0a669c08cca58ed93.tar.bz2
spark-8881765ac7ac6ba6fe9ef0d0a669c08cca58ed93.zip
[SPARK-15257][SQL] Require CREATE EXTERNAL TABLE to specify LOCATION
## What changes were proposed in this pull request? Before: ```sql -- uses warehouse dir anyway CREATE EXTERNAL TABLE my_tab -- doesn't actually delete the data DROP TABLE my_tab ``` After: ```sql -- no location is provided, throws exception CREATE EXTERNAL TABLE my_tab -- creates an external table using that location CREATE EXTERNAL TABLE my_tab LOCATION '/path/to/something' -- doesn't delete the data, which is expected DROP TABLE my_tab ``` ## How was this patch tested? New test in `DDLCommandSuite` Author: Andrew Or <andrew@databricks.com> Closes #13032 from andrewor14/create-external-table-location.
Diffstat (limited to 'sql/hive/compatibility/src/test')
-rw-r--r--sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
index f89a8479f0..54fb440b33 100644
--- a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
+++ b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
@@ -508,7 +508,10 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
// These tests use EXPLAIN FORMATTED, which is not supported
"input4",
"join0",
- "plan_json"
+ "plan_json",
+
+ // This test uses CREATE EXTERNAL TABLE without specifying LOCATION
+ "alter2"
)
/**
@@ -521,7 +524,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
"add_partition_no_whitelist",
"add_partition_with_whitelist",
"alias_casted_column",
- "alter2",
"alter_partition_with_whitelist",
"alter_rename_partition",
"ambiguous_col",