[ 
https://issues.apache.org/jira/browse/SPARK-25464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sushanta Sen updated SPARK-25464:
---------------------------------
    Description: 
Create Database.

CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] db_name [COMMENT comment_text] 
[*LOCATION*path] [WITH DBPROPERTIES (key1=val1, key2=val2, ...)]           
{\{LOCATION }}If the specified path does not already exist in the underlying 
file system, this command tries to create a directory with the path. *When the 
database is dropped later, this directory is not deleted, {color:#d04437}but 
currently it is deleting the directory as well.{color}

{color:#d04437}[databricks documentation|{color}
 
[https://docs.databricks.com/spark/latest/spark-sql/language-manual/create-database.html]
 {color:#d04437}]{color}

if i create the database as below

create database db1 location '/user/hive/warehouse'; //this is hive warehouse 
directory   

*{color:#333333}on dropping this db it will also delete the warehouse directory 
which contains the other db information.{color}*

  was:
Create Database. CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] db_name [COMMENT 
comment_text] [*LOCATION*path] [WITH DBPROPERTIES (key1=val1, key2=val2, 
...)]\{{LOCATION }}If the specified path does not already exist in the 
underlying file system, this command tries to create a directory with the path. 
*When the database is dropped later, this directory is not deleted, 
\{color:#d04437}{color:#d04437}but currently it is deleting the directory as 
well.{color}

{color:#d04437}[databricks documentation|{color}
[https://docs.databricks.com/spark/latest/spark-sql/language-manual/create-database.html]
{color:#d04437}]{color}

if i create the database as below\{color}{color}* 
*\{color:#d04437}{color:#333333}create database db1 location 
'/user/hive/warehouse'; //this is hive warehouse directory\{color}{color}*   
*\{color:#d04437}{color:#333333}on dropping this db it will also delete the 
warehouse directory which contains the other db information.\{color}{color}*


> Dropping database can remove the hive warehouse directory contents
> ------------------------------------------------------------------
>
>                 Key: SPARK-25464
>                 URL: https://issues.apache.org/jira/browse/SPARK-25464
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Sushanta Sen
>            Priority: Major
>
> Create Database.
> CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] db_name [COMMENT comment_text] 
> [*LOCATION*path] [WITH DBPROPERTIES (key1=val1, key2=val2, ...)]           
> {\{LOCATION }}If the specified path does not already exist in the underlying 
> file system, this command tries to create a directory with the path. *When 
> the database is dropped later, this directory is not deleted, 
> {color:#d04437}but currently it is deleting the directory as well.{color}
> {color:#d04437}[databricks documentation|{color}
>  
> [https://docs.databricks.com/spark/latest/spark-sql/language-manual/create-database.html]
>  {color:#d04437}]{color}
> if i create the database as below
> create database db1 location '/user/hive/warehouse'; //this is hive warehouse 
> directory   
> *{color:#333333}on dropping this db it will also delete the warehouse 
> directory which contains the other db information.{color}*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to