[ 
https://issues.apache.org/jira/browse/SPARK-25032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574754#comment-16574754
 ] 

sandeep katta commented on SPARK-25032:
---------------------------------------

I will be looking into this.

 

Solution:

1)Don't allow to delete the current database

2)Fall back to default once the database is deleted

 

> Create table is failing, after dropping the database . It is not falling back 
> to default database
> -------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-25032
>                 URL: https://issues.apache.org/jira/browse/SPARK-25032
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.1.0, 2.3.0, 2.3.1
>         Environment: Spark 2.3.1 
> Hadoop 2.7.3
>  
>            Reporter: Ayush Anubhava
>            Priority: Minor
>
> *Launch spark-beeline for both the scenarios*
> *Scenario 1*
> create database cbo1;
> use cbo1;
> create table test2 ( a int, b string , c int) stored as parquet;
> drop database cbo1 cascade;
> create table test1 ( a int, b string , c int) stored as parquet;
> {color:#ff0000}Output : Exception is thrown at this point {color}
> {color:#ff0000}Error: 
> org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 
> 'cbo1' not found; (state=,code=0){color}
> *Scenario 2:*
> create database cbo1;
> use cbo1;
> create table test2 ( a int, b string , c int) stored as parquet;
> drop database cbo1 cascade;
> create database cbo1;
> create table test1 ( a int, b string , c int) stored as parquet;
> {color:#ff0000}Output : Table is getting created in the database  "*cbo1*", 
> even on not using the database.It should have been created in default 
> db.{color}
>  
> In beeline session, after dropping the database , it is not falling back to 
> default db
>  



--
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