[
https://issues.apache.org/jira/browse/SPARK-16459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun updated SPARK-16459:
----------------------------------
Description:
This issue prevents dropping the current database to avoid errors like the
followings.
{code}
scala> sql("create database delete_db")
scala> sql("use delete_db")
scala> sql("drop database delete_db")
scala> sql("create table t as select 1")
org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database
'delete_db' not found;
{code}
was:
In case of dropping current working database, the current database should be
restored as `default`. This issue fixes that.
{code}
scala> sql("create database delete_db")
16/07/09 03:40:14 WARN ObjectStore: Failed to get database delete_db, returning
NoSuchObjectException
res0: org.apache.spark.sql.DataFrame = []
scala> sql("use delete_db")
res1: org.apache.spark.sql.DataFrame = []
scala> sql("drop database delete_db")
res2: org.apache.spark.sql.DataFrame = []
scala> sql("create table t as select 1")
org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database
'delete_db' not found;
{code}
Summary: Prevent dropping current database (was: Curren database
should become `default` when current database is dropped)
> Prevent dropping current database
> ---------------------------------
>
> Key: SPARK-16459
> URL: https://issues.apache.org/jira/browse/SPARK-16459
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Reporter: Dongjoon Hyun
> Priority: Minor
>
> This issue prevents dropping the current database to avoid errors like the
> followings.
> {code}
> scala> sql("create database delete_db")
> scala> sql("use delete_db")
> scala> sql("drop database delete_db")
> scala> sql("create table t as select 1")
> org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database
> 'delete_db' not found;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]