You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/09/05 07:20:19 UTC

spark git commit: [SPARK-21913][SQL][TEST] withDatabase` should drop database with CASCADE

Repository: spark
Updated Branches:
  refs/heads/master ca59445ad -> 4e7a29efd


[SPARK-21913][SQL][TEST] withDatabase` should drop database with CASCADE

## What changes were proposed in this pull request?

Currently, `withDatabase` fails if the database is not empty. It would be great if we drop cleanly with CASCADE.

## How was this patch tested?

This is a change on test util. Pass the existing Jenkins.

Author: Dongjoon Hyun <do...@apache.org>

Closes #19125 from dongjoon-hyun/SPARK-21913.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4e7a29ef
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4e7a29ef
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4e7a29ef

Branch: refs/heads/master
Commit: 4e7a29efdba6972a4713a62dfccb495504a25ab9
Parents: ca59445
Author: Dongjoon Hyun <do...@apache.org>
Authored: Tue Sep 5 00:20:16 2017 -0700
Committer: gatorsmile <ga...@gmail.com>
Committed: Tue Sep 5 00:20:16 2017 -0700

----------------------------------------------------------------------
 .../src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4e7a29ef/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
index e68db3b..a14a144 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
@@ -247,7 +247,7 @@ private[sql] trait SQLTestUtils
   protected def withDatabase(dbNames: String*)(f: => Unit): Unit = {
     try f finally {
       dbNames.foreach { name =>
-        spark.sql(s"DROP DATABASE IF EXISTS $name")
+        spark.sql(s"DROP DATABASE IF EXISTS $name CASCADE")
       }
       spark.sql(s"USE $DEFAULT_DATABASE")
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org