[ https://issues.apache.org/jira/browse/CARBONDATA-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15750940#comment-15750940 ] anubhav tarar commented on CARBONDATA-327: ------------------------------------------ i create a database in hive and carbondata then dropped both databases when i execute show table in hive it gives an exception that database does not exists but in carbon data it does not give any exception in hive--- i got following output ---- hive> CREATE DATABASE SAMPLE; OK hive (default)> use SAMPLE; OK hive (SAMPLE)> drop database SAMPLE; OK hive (SAMPLE)> use SAMPLE; FAILED: SemanticException [Error 10072]: Database does not exist: SAMPLE hive (SAMPLE)> show tables; FAILED: SemanticException [Error 10072]: Database does not exist: SAMPLE where as in carbondata i got folowing output 0: jdbc:hive2://localhost:10000> CREATE DATABASE SAMPLE; 0: jdbc:hive2://localhost:10000> USE SAMPLE; 0: jdbc:hive2://localhost:10000> DROP DATABASE SAMPLE; 0: jdbc:hive2://localhost:10000> USE SAMPLE; Error: org.apache.spark.sql.execution.QueryExecutionException: FAILED: SemanticException [Error 10072]: Database does not exist: SAMPLE (state=,code=0) 0: jdbc:hive2: 0: jdbc:hive2://localhost:10000>show tables; +------------+--------------+--+ | tableName | isTemporary | +------------+--------------+--+ +------------+--------------+--+ No rows selected (0.066 seconds) > Drop Daabase unexpected behaviour. > ----------------------------------- > > Key: CARBONDATA-327 > URL: https://issues.apache.org/jira/browse/CARBONDATA-327 > Project: CarbonData > Issue Type: Bug > Reporter: Harmeet Singh > > Hey team, I am creating a database as below: > 0: jdbc:hive2://127.0.0.1:10000> create database Test; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > After creating an database i am using that database using below command: > 0: jdbc:hive2://127.0.0.1:10000> use Test; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > After That, i am drop the database as below: > 0: jdbc:hive2://127.0.0.1:10000> drop database test; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > The database drop successfully. I am expecting, after that the carbon data automatically switch to the "default" database. But when i trying to execute command "show tables" the result return nothing as below : > 0: jdbc:hive2://127.0.0.1:10000> show tables; > +------------+--------------+--+ > | tableName | isTemporary | > +------------+--------------+--+ > +------------+--------------+--+ > No rows selected (0.019 seconds) > But my default database contains some table as below: > 0: jdbc:hive2://127.0.0.1:10000> use default; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > No rows selected (0.024 seconds) > 0: jdbc:hive2://127.0.0.1:10000> show tables; > +------------+--------------+--+ > | tableName | isTemporary | > +------------+--------------+--+ > | one | false | > | two | false | > +------------+--------------+--+ > 2 rows selected (0.013 seconds) > If I am following all above step on Hive, Hive gave us an error on show tables after drop the database as below: > hive> drop database test; > OK > Time taken: 0.628 seconds > hive> show databases; > OK > default > Time taken: 0.022 seconds, Fetched: 1 row(s) > hive> show tables; > FAILED: SemanticException [Error 10072]: Database does not exist: test -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |