hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amareshw...@apache.org
Subject svn commit: r1152709 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/Hive.g test/queries/clientpositive/database_location.q test/results/clientpositive/database_location.q.out
Date Mon, 01 Aug 2011 09:13:55 GMT
Author: amareshwari
Date: Mon Aug  1 09:13:53 2011
New Revision: 1152709

URL: http://svn.apache.org/viewvc?rev=1152709&view=rev
Log:
HIVE-2292. Comment clause should immediately follow identifier field in CREATE DATABASE statement.
Contributed by Carl Steinbach

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
    hive/trunk/ql/src/test/queries/clientpositive/database_location.q
    hive/trunk/ql/src/test/results/clientpositive/database_location.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g?rev=1152709&r1=1152708&r2=1152709&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g Mon Aug  1 09:13:53 2011
@@ -385,8 +385,8 @@ createDatabaseStatement
     : KW_CREATE (KW_DATABASE|KW_SCHEMA)
         ifNotExists?
         name=Identifier
-        dbLocation?
         databaseComment?
+        dbLocation?
         (KW_WITH KW_DBPROPERTIES dbprops=dbProperties)?
     -> ^(TOK_CREATEDATABASE $name ifNotExists? dbLocation? databaseComment? $dbprops?)
     ;

Modified: hive/trunk/ql/src/test/queries/clientpositive/database_location.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/database_location.q?rev=1152709&r1=1152708&r2=1152709&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/database_location.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/database_location.q Mon Aug  1 09:13:53
2011
@@ -1,16 +1,20 @@
-create database db1;
-describe database extended db1;
-use db1;
-create table table_db1 (name string, value int);
-describe formatted table_db1;
-show tables;
-
-create database db2 location '${hiveconf:hive.metastore.warehouse.dir}/db2';
-describe database extended db2;
-use db2;
-create table table_db2 (name string, value int);
-describe formatted table_db2;
-show tables;
+CREATE DATABASE db1;
+DESCRIBE DATABASE EXTENDED db1;
 
-drop database db2 cascade;
-drop database db1 cascade;
\ No newline at end of file
+USE db1;
+CREATE TABLE table_db1 (name STRING, value INT);
+
+DESCRIBE FORMATTED table_db1;
+SHOW TABLES;
+
+CREATE DATABASE db2
+COMMENT 'database 2'
+LOCATION '${hiveconf:hive.metastore.warehouse.dir}/db2';
+
+DESCRIBE DATABASE EXTENDED db2;
+
+USE db2;
+CREATE TABLE table_db2 (name STRING, value INT);
+
+DESCRIBE FORMATTED table_db2;
+SHOW TABLES;

Modified: hive/trunk/ql/src/test/results/clientpositive/database_location.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/database_location.q.out?rev=1152709&r1=1152708&r2=1152709&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/database_location.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/database_location.q.out Mon Aug  1 09:13:53
2011
@@ -1,24 +1,24 @@
-PREHOOK: query: create database db1
+PREHOOK: query: CREATE DATABASE db1
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: create database db1
+POSTHOOK: query: CREATE DATABASE db1
 POSTHOOK: type: CREATEDATABASE
-PREHOOK: query: describe database extended db1
+PREHOOK: query: DESCRIBE DATABASE EXTENDED db1
 PREHOOK: type: DESCDATABASE
-POSTHOOK: query: describe database extended db1
+POSTHOOK: query: DESCRIBE DATABASE EXTENDED db1
 POSTHOOK: type: DESCDATABASE
-db1		pfile:/home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db1.db

-PREHOOK: query: use db1
+db1		pfile:/Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db1.db
+PREHOOK: query: USE db1
 PREHOOK: type: SWITCHDATABASE
-POSTHOOK: query: use db1
+POSTHOOK: query: USE db1
 POSTHOOK: type: SWITCHDATABASE
-PREHOOK: query: create table table_db1 (name string, value int)
+PREHOOK: query: CREATE TABLE table_db1 (name STRING, value INT)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table table_db1 (name string, value int)
+POSTHOOK: query: CREATE TABLE table_db1 (name STRING, value INT)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db1@table_db1
-PREHOOK: query: describe formatted table_db1
+PREHOOK: query: DESCRIBE FORMATTED table_db1
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe formatted table_db1
+POSTHOOK: query: DESCRIBE FORMATTED table_db1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -27,15 +27,15 @@ value               	int                
 	 	 
 # Detailed Table Information	 	 
 Database:           	db1                 	 
-Owner:              	thiruvel            	 
-CreateTime:         	Tue Jun 21 06:57:44 PDT 2011	 
+Owner:              	carl
+CreateTime:         	Tue Jul 19 16:34:59 PDT 2011
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
 Retention:          	0                   	 
-Location:           	pfile:/home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db1.db/table_db1
 
+Location:           	pfile:/Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db1.db/table_db1
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
-	transient_lastDdlTime	1308664664          
+	transient_lastDdlTime	1311118499
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 
@@ -47,32 +47,36 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: show tables
+PREHOOK: query: SHOW TABLES
 PREHOOK: type: SHOWTABLES
-POSTHOOK: query: show tables
+POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 table_db1
-PREHOOK: query: create database db2 location 'pfile:///home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db2'
+PREHOOK: query: CREATE DATABASE db2
+COMMENT 'database 2'
+LOCATION 'pfile:///Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db2'
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: create database db2 location 'pfile:///home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db2'
+POSTHOOK: query: CREATE DATABASE db2
+COMMENT 'database 2'
+LOCATION 'pfile:///Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db2'
 POSTHOOK: type: CREATEDATABASE
-PREHOOK: query: describe database extended db2
+PREHOOK: query: DESCRIBE DATABASE EXTENDED db2
 PREHOOK: type: DESCDATABASE
-POSTHOOK: query: describe database extended db2
+POSTHOOK: query: DESCRIBE DATABASE EXTENDED db2
 POSTHOOK: type: DESCDATABASE
-db2		pfile:/home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db2	
-PREHOOK: query: use db2
+db2	database 2	pfile:/Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db2
+PREHOOK: query: USE db2
 PREHOOK: type: SWITCHDATABASE
-POSTHOOK: query: use db2
+POSTHOOK: query: USE db2
 POSTHOOK: type: SWITCHDATABASE
-PREHOOK: query: create table table_db2 (name string, value int)
+PREHOOK: query: CREATE TABLE table_db2 (name STRING, value INT)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table table_db2 (name string, value int)
+POSTHOOK: query: CREATE TABLE table_db2 (name STRING, value INT)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db2@table_db2
-PREHOOK: query: describe formatted table_db2
+PREHOOK: query: DESCRIBE FORMATTED table_db2
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe formatted table_db2
+POSTHOOK: query: DESCRIBE FORMATTED table_db2
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -81,15 +85,15 @@ value               	int                
 	 	 
 # Detailed Table Information	 	 
 Database:           	db2                 	 
-Owner:              	thiruvel            	 
-CreateTime:         	Tue Jun 21 06:57:45 PDT 2011	 
+Owner:              	carl
+CreateTime:         	Tue Jul 19 16:35:00 PDT 2011
 LastAccessTime:     	UNKNOWN             	 
 Protect Mode:       	None                	 
 Retention:          	0                   	 
-Location:           	pfile:/home/thiruvel/projects/hive/secure.trunk/build/ql/test/data/warehouse/db2/table_db2
 
+Location:           	pfile:/Users/carl/Work/repos/hive3/build/ql/test/data/warehouse/db2/table_db2
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
-	transient_lastDdlTime	1308664665          
+	transient_lastDdlTime	1311118500
 	 	 
 # Storage Information	 	 
 SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	 
@@ -101,16 +105,8 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: show tables
+PREHOOK: query: SHOW TABLES
 PREHOOK: type: SHOWTABLES
-POSTHOOK: query: show tables
+POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 table_db2
-PREHOOK: query: drop database db2 cascade
-PREHOOK: type: DROPDATABASE
-POSTHOOK: query: drop database db2 cascade
-POSTHOOK: type: DROPDATABASE
-PREHOOK: query: drop database db1 cascade
-PREHOOK: type: DROPDATABASE
-POSTHOOK: query: drop database db1 cascade
-POSTHOOK: type: DROPDATABASE



Mime
View raw message