-
- Downloads
[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.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala 4 additions, 0 deletions...scala/org/apache/spark/sql/execution/SparkSqlParser.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala 18 additions, 2 deletions.../apache/spark/sql/execution/command/DDLCommandSuite.scala
- sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala 4 additions, 2 deletions...che/spark/sql/hive/execution/HiveCompatibilitySuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala 2 additions, 7 deletions...scala/org/apache/spark/sql/hive/HiveDDLCommandSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveCommandSuite.scala 1 addition, 1 deletion...rg/apache/spark/sql/hive/execution/HiveCommandSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveTableScanSuite.scala 1 addition, 1 deletion.../apache/spark/sql/hive/execution/HiveTableScanSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala 1 addition, 1 deletion...la/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
Loading
Please register or sign in to comment