Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25032

Create table is failing, after dropping the database . It is not falling back to default database

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Incomplete
    • 2.1.0, 2.3.0, 2.3.1
    • None
    • SQL
    • Spark 2.3.1 

      Hadoop 2.7.3

       

    Description

      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;

      Output : Exception is thrown at this point 

      Error: org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 'cbo1' not found; (state=,code=0)

      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;

      Output : Table is getting created in the database  "cbo1", even on not using the database.It should have been created in default db.

       

      In beeline session, after dropping the database , it is not falling back to default db

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Ayush007 Ayush Anubhava
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: