You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "sandeep katta (JIRA)" <ji...@apache.org> on 2018/08/09 12:17:00 UTC

[jira] [Comment Edited] (SPARK-25032) Create table is failing, after dropping the database . It is not falling back to default database

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

sandeep katta edited comment on SPARK-25032 at 8/9/18 12:16 PM:
----------------------------------------------------------------

I will be looking into this.

 

Solution:

1)Don't allow to delete the current database or

2)Fall back to default once the database is deleted

 


was (Author: sandeep.katta2007):
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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org