Login  Register

Drop Database <dbname> cascade hive command not supported.

Posted by Harmeet Singh on Oct 20, 2016; 10:45am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/Drop-Database-dbname-cascade-hive-command-not-supported-tp2097.html

Hey team, I am creating a database and that database contains tables. I want to drop the database and clean the table in one command using cascade, but carbon data gave us an error. If i am using hive, hive allow me for dropping database with cascade. Below are the details:

In CarbonData:
0: jdbc:hive2://127.0.0.1:10000> use databse fordrop;
Error: org.apache.spark.sql.AnalysisException: extraneous input 'fordrop' expecting EOF near '<EOF>'; line 1 pos 12 (state=,code=0)

0: jdbc:hive2://127.0.0.1:10000> use fordrop;
+---------+--+
| result  |
+---------+--+
+---------+--+
No rows selected (0.039 seconds)

0: jdbc:hive2://127.0.0.1:10000> create table testOne(name string, age int) stored by 'carbondata';
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (0.16 seconds)
0: jdbc:hive2://127.0.0.1:10000> drop database fordrop cascade;
Error: org.apache.carbondata.spark.exception.MalformedCarbonCommandException: Unsupported cascade operation in drop database/schema command (state=,code=0)

In Hive:
hive> create database fordrop;
OK
Time taken: 8.679 seconds
hive> use fordrop;
OK
Time taken: 0.656 seconds
hive> create table testOne(name String, age int);
OK
Time taken: 2.854 seconds
hive> drop database fordrop cascade;
OK
Time taken: 5.303 seconds

This seems an issue, please confirm ?