diff options
author | windpiger <songjun@outlook.com> | 2017-03-16 08:44:57 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2017-03-16 08:44:57 +0800 |
commit | fc9314671c8a082ae339fd6df177a2b684c65d40 (patch) | |
tree | 768e0fce68c324eec609fcb8a0915bcad42e1954 /sql/core/src/test/scala | |
parent | 339b237dc18d4367b0735236b4b8be2901fcad79 (diff) | |
download | spark-fc9314671c8a082ae339fd6df177a2b684c65d40.tar.gz spark-fc9314671c8a082ae339fd6df177a2b684c65d40.tar.bz2 spark-fc9314671c8a082ae339fd6df177a2b684c65d40.zip |
[SPARK-19961][SQL][MINOR] unify a erro msg when drop databse for HiveExternalCatalog and InMemoryCatalog
## What changes were proposed in this pull request?
unify a exception erro msg for dropdatabase when the database still have some tables for HiveExternalCatalog and InMemoryCatalog
## How was this patch tested?
N/A
Author: windpiger <songjun@outlook.com>
Closes #17305 from windpiger/unifyErromsg.
Diffstat (limited to 'sql/core/src/test/scala')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala index 6eed10ec51..dd76fdde06 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala @@ -617,12 +617,8 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils { val message = intercept[AnalysisException] { sql(s"DROP DATABASE $dbName RESTRICT") }.getMessage - // TODO: Unify the exception. - if (isUsingHiveMetastore) { - assert(message.contains(s"Database $dbName is not empty. One or more tables exist")) - } else { - assert(message.contains(s"Database '$dbName' is not empty. One or more tables exist")) - } + assert(message.contains(s"Database $dbName is not empty. One or more tables exist")) + catalog.dropTable(tableIdent1, ignoreIfNotExists = false, purge = false) |