Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12081#discussion_r61988141
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala 
---
    @@ -348,4 +364,99 @@ class HiveDDLSuite extends QueryTest with SQLTestUtils 
with TestHiveSingleton {
           }
         }
       }
    +
    +  test("create/drop database - location") {
    +    val catalog = sqlContext.sessionState.catalog
    +    withTempDir { tmpDir =>
    +      val dbName = "db1"
    +      val tabName = "tab1"
    +      val path = "file:" + catalog.createDatabasePath(dbName, 
Option(tmpDir.toString))
    +      val fs = new 
Path(path).getFileSystem(hiveContext.sessionState.newHadoopConf())
    +      withTable(tabName) {
    +        assert(tmpDir.listFiles.isEmpty)
    +        sql(s"CREATE DATABASE $dbName Location '$tmpDir'")
    --- End diff --
    
    If we create a database with a given location, then we drop this database, 
will we still keep the dir like external table?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to