hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1466300 [4/13] - in /hive/trunk: cli/src/java/org/apache/hadoop/hive/cli/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/
Date Wed, 10 Apr 2013 00:07:09 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/create_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view.q.out Wed Apr 10 00:06:55 2013
@@ -136,10 +136,12 @@ POSTHOOK: Input: default@src
 POSTHOOK: Input: default@view3
 #### A masked pattern was here ####
 VAL_86
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- test EXPLAIN output for CREATE VIEW
+EXPLAIN
 CREATE VIEW view0(valoo) AS SELECT upper(value) FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- test EXPLAIN output for CREATE VIEW
+EXPLAIN
 CREATE VIEW view0(valoo) AS SELECT upper(value) FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
 ABSTRACT SYNTAX TREE:
@@ -161,10 +163,12 @@ STAGE PLANS:
           original text: SELECT upper(value) FROM src WHERE key=86
 
 
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- make sure EXPLAIN works with a query which references a view
+EXPLAIN
 SELECT * from view2 where key=18
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- make sure EXPLAIN works with a query which references a view
+EXPLAIN
 SELECT * from view2 where key=18
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
@@ -403,9 +407,13 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE table1 (key int)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@table1
-PREHOOK: query: DESCRIBE EXTENDED table1
-PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE EXTENDED table1
+PREHOOK: query: -- use DESCRIBE EXTENDED on a base table and an external table as points
+-- of comparison for view descriptions
+DESCRIBE EXTENDED table1
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: -- use DESCRIBE EXTENDED on a base table and an external table as points
+-- of comparison for view descriptions
+DESCRIBE EXTENDED table1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -422,9 +430,13 @@ key                 	string             
 value               	string              	default             
 	 	 
 #### A masked pattern was here ####
-PREHOOK: query: DESCRIBE EXTENDED table1
-PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE EXTENDED table1
+PREHOOK: query: -- use DESCRIBE EXTENDED on a base table as a point of comparison for
+-- view descriptions
+DESCRIBE EXTENDED table1
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: -- use DESCRIBE EXTENDED on a base table as a point of comparison for
+-- view descriptions
+DESCRIBE EXTENDED table1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -557,10 +569,14 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 	 	 
 key1                	int                 	None                
 key2                	int                 	None                
-PREHOOK: query: CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
+PREHOOK: query: -- verify that column name and comment in DDL portion
+-- overrides column alias in SELECT
+CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
 SELECT upper(value) as blarg FROM src WHERE key=86
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
+POSTHOOK: query: -- verify that column name and comment in DDL portion
+-- overrides column alias in SELECT
+CREATE VIEW view6(valoo COMMENT 'I cannot spell') AS
 SELECT upper(value) as blarg FROM src WHERE key=86
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Output: default@view6
@@ -573,13 +589,15 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 # col_name            	data_type           	comment             
 	 	 
 valoo               	string              	I cannot spell      
-PREHOOK: query: CREATE VIEW view7 AS
+PREHOOK: query: -- verify that ORDER BY and LIMIT are both supported in view def
+CREATE VIEW view7 AS
 SELECT * FROM src
 WHERE key > 80 AND key < 100
 ORDER BY key, value
 LIMIT 10
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view7 AS
+POSTHOOK: query: -- verify that ORDER BY and LIMIT are both supported in view def
+CREATE VIEW view7 AS
 SELECT * FROM src
 WHERE key > 80 AND key < 100
 ORDER BY key, value
@@ -608,12 +626,18 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 87	val_87
 90	val_90
 90	val_90
-PREHOOK: query: SELECT * FROM view7 ORDER BY key DESC, value
+PREHOOK: query: -- top-level ORDER BY should override the one inside the view
+-- (however, the inside ORDER BY should still influence the evaluation
+-- of the limit)
+SELECT * FROM view7 ORDER BY key DESC, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@view7
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM view7 ORDER BY key DESC, value
+POSTHOOK: query: -- top-level ORDER BY should override the one inside the view
+-- (however, the inside ORDER BY should still influence the evaluation
+-- of the limit)
+SELECT * FROM view7 ORDER BY key DESC, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@view7
@@ -629,12 +653,14 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 83	val_83
 83	val_83
 82	val_82
-PREHOOK: query: SELECT * FROM view7 LIMIT 5
+PREHOOK: query: -- top-level LIMIT should override if lower
+SELECT * FROM view7 LIMIT 5
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@view7
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM view7 LIMIT 5
+POSTHOOK: query: -- top-level LIMIT should override if lower
+SELECT * FROM view7 LIMIT 5
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@view7
@@ -645,12 +671,14 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 83	val_83
 84	val_84
 84	val_84
-PREHOOK: query: SELECT * FROM view7 LIMIT 20
+PREHOOK: query: -- but not if higher
+SELECT * FROM view7 LIMIT 20
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@view7
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM view7 LIMIT 20
+POSTHOOK: query: -- but not if higher
+SELECT * FROM view7 LIMIT 20
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@view7
@@ -666,10 +694,12 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 87	val_87
 90	val_90
 90	val_90
-PREHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS
+PREHOOK: query: -- test usage of a function within a view
+CREATE TEMPORARY FUNCTION test_translate AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 PREHOOK: type: CREATEFUNCTION
-POSTHOOK: query: CREATE TEMPORARY FUNCTION test_translate AS
+POSTHOOK: query: -- test usage of a function within a view
+CREATE TEMPORARY FUNCTION test_translate AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate'
 POSTHOOK: type: CREATEFUNCTION
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
@@ -739,18 +769,22 @@ POSTHOOK: Input: default@view8
 #### A masked pattern was here ####
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 bbc
-PREHOOK: query: CREATE TEMPORARY FUNCTION test_max AS
+PREHOOK: query: -- test usage of a UDAF within a view
+CREATE TEMPORARY FUNCTION test_max AS
 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 PREHOOK: type: CREATEFUNCTION
-POSTHOOK: query: CREATE TEMPORARY FUNCTION test_max AS
+POSTHOOK: query: -- test usage of a UDAF within a view
+CREATE TEMPORARY FUNCTION test_max AS
 'org.apache.hadoop.hive.ql.udf.UDAFTestMax'
 POSTHOOK: type: CREATEFUNCTION
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: CREATE VIEW view9(m) AS
+PREHOOK: query: -- disable map-side aggregation
+CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view9(m) AS
+POSTHOOK: query: -- disable map-side aggregation
+CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 POSTHOOK: type: CREATEVIEW
@@ -821,11 +855,13 @@ POSTHOOK: type: DROPVIEW
 POSTHOOK: Input: default@view9
 POSTHOOK: Output: default@view9
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: CREATE VIEW view9(m) AS
+PREHOOK: query: -- enable map-side aggregation
+CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view9(m) AS
+POSTHOOK: query: -- enable map-side aggregation
+CREATE VIEW view9(m) AS
 SELECT test_max(length(value))
 FROM src
 POSTHOOK: type: CREATEVIEW
@@ -887,10 +923,12 @@ POSTHOOK: Input: default@view9
 #### A masked pattern was here ####
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 7
-PREHOOK: query: CREATE VIEW view10 AS
+PREHOOK: query: -- test usage of a subselect within a view
+CREATE VIEW view10 AS
 SELECT slurp.* FROM (SELECT * FROM src WHERE key=86) slurp
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view10 AS
+POSTHOOK: query: -- test usage of a subselect within a view
+CREATE VIEW view10 AS
 SELECT slurp.* FROM (SELECT * FROM src WHERE key=86) slurp
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Output: default@view10
@@ -949,10 +987,12 @@ POSTHOOK: Input: default@view10
 #### A masked pattern was here ####
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 86	val_86
-PREHOOK: query: CREATE TEMPORARY FUNCTION test_explode AS
+PREHOOK: query: -- test usage of a UDTF within a view
+CREATE TEMPORARY FUNCTION test_explode AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDTFExplode'
 PREHOOK: type: CREATEFUNCTION
-POSTHOOK: query: CREATE TEMPORARY FUNCTION test_explode AS
+POSTHOOK: query: -- test usage of a UDTF within a view
+CREATE TEMPORARY FUNCTION test_explode AS
 'org.apache.hadoop.hive.ql.udf.generic.GenericUDTFExplode'
 POSTHOOK: type: CREATEFUNCTION
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
@@ -1024,10 +1064,12 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 1
 2
 3
-PREHOOK: query: CREATE VIEW view12 AS
+PREHOOK: query: -- test usage of LATERAL within a view
+CREATE VIEW view12 AS
 SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view12 AS
+POSTHOOK: query: -- test usage of LATERAL within a view
+CREATE VIEW view12 AS
 SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Output: default@view12
@@ -1090,13 +1132,15 @@ POSTHOOK: Input: default@view12
 #### A masked pattern was here ####
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 0	val_0	1
-PREHOOK: query: SELECT * FROM view2 LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
+PREHOOK: query: -- test usage of LATERAL with a view as the LHS
+SELECT * FROM view2 LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 ORDER BY key ASC, myCol ASC LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@view2
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM view2 LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
+POSTHOOK: query: -- test usage of LATERAL with a view as the LHS
+SELECT * FROM view2 LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 ORDER BY key ASC, myCol ASC LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
@@ -1104,11 +1148,13 @@ POSTHOOK: Input: default@view2
 #### A masked pattern was here ####
 POSTHOOK: Lineage: table1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 0	val_0	1
-PREHOOK: query: CREATE VIEW view13 AS
+PREHOOK: query: -- test usage of TABLESAMPLE within a view
+CREATE VIEW view13 AS
 SELECT s.key
 FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view13 AS
+POSTHOOK: query: -- test usage of TABLESAMPLE within a view
+CREATE VIEW view13 AS
 SELECT s.key
 FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s
 POSTHOOK: type: CREATEVIEW
@@ -1183,7 +1229,8 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 10
 10
 15
-PREHOOK: query: CREATE VIEW view14 AS
+PREHOOK: query: -- test usage of JOIN+UNION+AGG all within same view
+CREATE VIEW view14 AS
 SELECT unionsrc1.key as k1, unionsrc1.value as v1,
        unionsrc2.key as k2, unionsrc2.value as v2
 FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1
@@ -1195,7 +1242,8 @@ JOIN
       select s4.key as key, s4.value as value from src s4 where s4.key < 10) unionsrc2
 ON (unionsrc1.key = unionsrc2.key)
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view14 AS
+POSTHOOK: query: -- test usage of JOIN+UNION+AGG all within same view
+CREATE VIEW view14 AS
 SELECT unionsrc1.key as k1, unionsrc1.value as v1,
        unionsrc2.key as k2, unionsrc2.value as v2
 FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1
@@ -1327,12 +1375,14 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 8	val_8	8	val_8
 9	val_9	9	val_9
 tst1	500	tst1	500
-PREHOOK: query: CREATE VIEW view15 AS
+PREHOOK: query: -- test usage of GROUP BY within view
+CREATE VIEW view15 AS
 SELECT key,COUNT(value) AS value_count
 FROM src
 GROUP BY key
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view15 AS
+POSTHOOK: query: -- test usage of GROUP BY within view
+CREATE VIEW view15 AS
 SELECT key,COUNT(value) AS value_count
 FROM src
 GROUP BY key
@@ -1414,11 +1464,13 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 406	4
 468	4
 489	4
-PREHOOK: query: CREATE VIEW view16 AS
+PREHOOK: query: -- test usage of DISTINCT within view
+CREATE VIEW view16 AS
 SELECT DISTINCT value
 FROM src
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW view16 AS
+POSTHOOK: query: -- test usage of DISTINCT within view
+CREATE VIEW view16 AS
 SELECT DISTINCT value
 FROM src
 POSTHOOK: type: CREATEVIEW
@@ -1493,11 +1545,13 @@ val_11
 val_111
 val_113
 val_114
-PREHOOK: query: DROP TABLE IF EXISTS view16
+PREHOOK: query: -- HIVE-2133:  DROP TABLE IF EXISTS should ignore a matching view name
+DROP TABLE IF EXISTS view16
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@view16
 PREHOOK: Output: default@view16
-POSTHOOK: query: DROP TABLE IF EXISTS view16
+POSTHOOK: query: -- HIVE-2133:  DROP TABLE IF EXISTS should ignore a matching view name
+DROP TABLE IF EXISTS view16
 POSTHOOK: type: DROPTABLE
 POSTHOOK: Input: default@view16
 POSTHOOK: Output: default@view16
@@ -1510,11 +1564,13 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 # col_name            	data_type           	comment             
 	 	 
 value               	string              	None                
-PREHOOK: query: DROP VIEW IF EXISTS table1
+PREHOOK: query: -- Likewise, DROP VIEW IF EXISTS should ignore a matching table name
+DROP VIEW IF EXISTS table1
 PREHOOK: type: DROPVIEW
 PREHOOK: Input: default@table1
 PREHOOK: Output: default@table1
-POSTHOOK: query: DROP VIEW IF EXISTS table1
+POSTHOOK: query: -- Likewise, DROP VIEW IF EXISTS should ignore a matching table name
+DROP VIEW IF EXISTS table1
 POSTHOOK: type: DROPVIEW
 POSTHOOK: Input: default@table1
 POSTHOOK: Output: default@table1
@@ -1528,11 +1584,19 @@ POSTHOOK: Lineage: table1.key EXPRESSION
 	 	 
 key                 	int                 	None                
 value               	string              	None                
-PREHOOK: query: DROP VIEW view1
+PREHOOK: query: -- this should work since currently we don't track view->table
+-- dependencies for implementing RESTRICT
+
+
+DROP VIEW view1
 PREHOOK: type: DROPVIEW
 PREHOOK: Input: default@view1
 PREHOOK: Output: default@view1
-POSTHOOK: query: DROP VIEW view1
+POSTHOOK: query: -- this should work since currently we don't track view->table
+-- dependencies for implementing RESTRICT
+
+
+DROP VIEW view1
 POSTHOOK: type: DROPVIEW
 POSTHOOK: Input: default@view1
 POSTHOOK: Output: default@view1

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out Wed Apr 10 00:06:55 2013
@@ -10,14 +10,18 @@ PREHOOK: query: DROP VIEW vp3
 PREHOOK: type: DROPVIEW
 POSTHOOK: query: DROP VIEW vp3
 POSTHOOK: type: DROPVIEW
-PREHOOK: query: CREATE VIEW vp1
+PREHOOK: query: -- test partitioned view definition
+-- (underlying table is not actually partitioned)
+CREATE VIEW vp1
 PARTITIONED ON (value)
 AS
 SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW vp1
+POSTHOOK: query: -- test partitioned view definition
+-- (underlying table is not actually partitioned)
+CREATE VIEW vp1
 PARTITIONED ON (value)
 AS
 SELECT key, value
@@ -127,13 +131,15 @@ POSTHOOK: Input: default@src
 POSTHOOK: Input: default@vp1
 POSTHOOK: Output: default@vp1@value=val_86
 POSTHOOK: Output: default@vp1@value=val_xyz
-PREHOOK: query: ALTER VIEW vp1
+PREHOOK: query: -- should work since we use IF NOT EXISTS
+ALTER VIEW vp1
 ADD IF NOT EXISTS PARTITION (value='val_xyz')
 PREHOOK: type: ALTERTABLE_ADDPARTS
 PREHOOK: Input: default@src
 PREHOOK: Input: default@vp1
 PREHOOK: Output: default@vp1@value=val_xyz
-POSTHOOK: query: ALTER VIEW vp1
+POSTHOOK: query: -- should work since we use IF NOT EXISTS
+ALTER VIEW vp1
 ADD IF NOT EXISTS PARTITION (value='val_xyz')
 POSTHOOK: type: ALTERTABLE_ADDPARTS
 POSTHOOK: Input: default@src
@@ -186,11 +192,13 @@ DROP PARTITION (value='val_xyz')
 POSTHOOK: type: ALTERTABLE_DROPPARTS
 POSTHOOK: Input: default@vp1
 POSTHOOK: Output: default@vp1@value=val_xyz
-PREHOOK: query: ALTER VIEW vp1
+PREHOOK: query: -- should work since we use IF EXISTS
+ALTER VIEW vp1
 DROP IF EXISTS PARTITION (value='val_xyz')
 PREHOOK: type: ALTERTABLE_DROPPARTS
 PREHOOK: Input: default@vp1
-POSTHOOK: query: ALTER VIEW vp1
+POSTHOOK: query: -- should work since we use IF EXISTS
+ALTER VIEW vp1
 DROP IF EXISTS PARTITION (value='val_xyz')
 POSTHOOK: type: ALTERTABLE_DROPPARTS
 POSTHOOK: Input: default@vp1
@@ -199,22 +207,34 @@ PREHOOK: type: SHOWPARTITIONS
 POSTHOOK: query: SHOW PARTITIONS vp1
 POSTHOOK: type: SHOWPARTITIONS
 value=val_86
-PREHOOK: query: SELECT * FROM vp1
+PREHOOK: query: -- Even though no partition predicate is specified in the next query,
+-- the WHERE clause inside of the view should satisfy strict mode.
+-- In other words, strict only applies to underlying tables
+-- (regardless of whether or not the view is partitioned).
+SELECT * FROM vp1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@vp1
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM vp1
+POSTHOOK: query: -- Even though no partition predicate is specified in the next query,
+-- the WHERE clause inside of the view should satisfy strict mode.
+-- In other words, strict only applies to underlying tables
+-- (regardless of whether or not the view is partitioned).
+SELECT * FROM vp1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@vp1
 #### A masked pattern was here ####
 86	val_86
-PREHOOK: query: CREATE VIEW vp2
+PREHOOK: query: -- test a partitioned view on top of an underlying partitioned table,
+-- but with only a suffix of the partitioning columns
+CREATE VIEW vp2
 PARTITIONED ON (hr)
 AS SELECT * FROM srcpart WHERE key < 10
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW vp2
+POSTHOOK: query: -- test a partitioned view on top of an underlying partitioned table,
+-- but with only a suffix of the partitioning columns
+CREATE VIEW vp2
 PARTITIONED ON (hr)
 AS SELECT * FROM srcpart WHERE key < 10
 POSTHOOK: type: CREATEVIEW
@@ -307,14 +327,18 @@ POSTHOOK: Input: default@vp2
 8
 9
 9
-PREHOOK: query: CREATE VIEW vp3(k,v)
+PREHOOK: query: -- test a partitioned view where the PARTITIONED ON clause references
+-- an imposed column name
+CREATE VIEW vp3(k,v)
 PARTITIONED ON (v)
 AS
 SELECT key, value
 FROM src
 WHERE key=86
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: CREATE VIEW vp3(k,v)
+POSTHOOK: query: -- test a partitioned view where the PARTITIONED ON clause references
+-- an imposed column name
+CREATE VIEW vp3(k,v)
 PARTITIONED ON (v)
 AS
 SELECT key, value

Modified: hive/trunk/ql/src/test/results/clientpositive/cross_join.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/cross_join.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/cross_join.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/cross_join.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: explain select src.key from src join src src2
+PREHOOK: query: -- current
+explain select src.key from src join src src2
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select src.key from src join src src2
+POSTHOOK: query: -- current
+explain select src.key from src join src src2
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src)) (TOK_TABREF (TOK_TABNAME src) src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)))))
@@ -54,9 +56,11 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: explain select src.key from src cross join src src2
+PREHOOK: query: -- ansi cross join
+explain select src.key from src cross join src src2
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select src.key from src cross join src src2
+POSTHOOK: query: -- ansi cross join
+explain select src.key from src cross join src src2
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_CROSSJOIN (TOK_TABREF (TOK_TABNAME src)) (TOK_TABREF (TOK_TABNAME src) src2))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)))))
@@ -110,9 +114,11 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: explain select src.key from src cross join src src2 on src.key=src2.key
+PREHOOK: query: -- appending condition is allowed
+explain select src.key from src cross join src src2 on src.key=src2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select src.key from src cross join src src2 on src.key=src2.key
+POSTHOOK: query: -- appending condition is allowed
+explain select src.key from src cross join src src2 on src.key=src2.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_CROSSJOIN (TOK_TABREF (TOK_TABNAME src)) (TOK_TABREF (TOK_TABNAME src) src2) (= (. (TOK_TABLE_OR_COL src) key) (. (TOK_TABLE_OR_COL src2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL src) key)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/ctas_hadoop20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ctas_hadoop20.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ctas_hadoop20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ctas_hadoop20.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: create table nzhang_Tmp(a int, b string)
+PREHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+create table nzhang_Tmp(a int, b string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table nzhang_Tmp(a int, b string)
+POSTHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+create table nzhang_Tmp(a int, b string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@nzhang_Tmp
 PREHOOK: query: select * from nzhang_Tmp

Modified: hive/trunk/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,15 @@
-PREHOOK: query: CREATE DATABASE db1
+PREHOOK: query: -- Tests that CTAS queries in non-default databases use the location of the database
+-- not the hive.metastore.warehouse.dir for intermediate files (FileSinkOperator output).
+-- If hive.metastore.warehouse.dir were used this would fail because the scheme is invalid.
+
+CREATE DATABASE db1
 #### A masked pattern was here ####
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE db1
+POSTHOOK: query: -- Tests that CTAS queries in non-default databases use the location of the database
+-- not the hive.metastore.warehouse.dir for intermediate files (FileSinkOperator output).
+-- If hive.metastore.warehouse.dir were used this would fail because the scheme is invalid.
+
+CREATE DATABASE db1
 #### A masked pattern was here ####
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: USE db1

Modified: hive/trunk/ql/src/test/results/clientpositive/database.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/database.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/database.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/database.q.out Wed Apr 10 00:06:55 2013
@@ -3,9 +3,11 @@ PREHOOK: type: SHOWDATABASES
 POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
-PREHOOK: query: CREATE DATABASE test_db COMMENT 'Hive test database'
+PREHOOK: query: -- CREATE with comment
+CREATE DATABASE test_db COMMENT 'Hive test database'
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE test_db COMMENT 'Hive test database'
+POSTHOOK: query: -- CREATE with comment
+CREATE DATABASE test_db COMMENT 'Hive test database'
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -13,9 +15,11 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: CREATE DATABASE IF NOT EXISTS test_db
+PREHOOK: query: -- CREATE INE already exists
+CREATE DATABASE IF NOT EXISTS test_db
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE IF NOT EXISTS test_db
+POSTHOOK: query: -- CREATE INE already exists
+CREATE DATABASE IF NOT EXISTS test_db
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -23,24 +27,30 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: SHOW SCHEMAS
+PREHOOK: query: -- SHOW DATABASES synonym
+SHOW SCHEMAS
 PREHOOK: type: SHOWDATABASES
-POSTHOOK: query: SHOW SCHEMAS
+POSTHOOK: query: -- SHOW DATABASES synonym
+SHOW SCHEMAS
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: DROP DATABASE test_db
+PREHOOK: query: -- DROP
+DROP DATABASE test_db
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE test_db
+POSTHOOK: query: -- DROP
+DROP DATABASE test_db
 POSTHOOK: type: DROPDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
 POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
-PREHOOK: query: CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
+PREHOOK: query: -- CREATE INE doesn't exist
+CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
+POSTHOOK: query: -- CREATE INE doesn't exist
+CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -48,22 +58,28 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: DROP DATABASE IF EXISTS test_db
+PREHOOK: query: -- DROP IE exists
+DROP DATABASE IF EXISTS test_db
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE IF EXISTS test_db
+POSTHOOK: query: -- DROP IE exists
+DROP DATABASE IF EXISTS test_db
 POSTHOOK: type: DROPDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
 POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
-PREHOOK: query: DROP DATABASE IF EXISTS test_db
+PREHOOK: query: -- DROP IE doesn't exist
+DROP DATABASE IF EXISTS test_db
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE IF EXISTS test_db
+POSTHOOK: query: -- DROP IE doesn't exist
+DROP DATABASE IF EXISTS test_db
 POSTHOOK: type: DROPDATABASE
-PREHOOK: query: CREATE DATABASE test_db
+PREHOOK: query: -- SHOW
+CREATE DATABASE test_db
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE test_db
+POSTHOOK: query: -- SHOW
+CREATE DATABASE test_db
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -71,14 +87,18 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: SHOW DATABASES LIKE 'test*'
+PREHOOK: query: -- SHOW pattern
+SHOW DATABASES LIKE 'test*'
 PREHOOK: type: SHOWDATABASES
-POSTHOOK: query: SHOW DATABASES LIKE 'test*'
+POSTHOOK: query: -- SHOW pattern
+SHOW DATABASES LIKE 'test*'
 POSTHOOK: type: SHOWDATABASES
 test_db
-PREHOOK: query: SHOW DATABASES LIKE '*ef*'
+PREHOOK: query: -- SHOW pattern
+SHOW DATABASES LIKE '*ef*'
 PREHOOK: type: SHOWDATABASES
-POSTHOOK: query: SHOW DATABASES LIKE '*ef*'
+POSTHOOK: query: -- SHOW pattern
+SHOW DATABASES LIKE '*ef*'
 POSTHOOK: type: SHOWDATABASES
 default
 PREHOOK: query: USE test_db
@@ -91,9 +111,11 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
 test_db
-PREHOOK: query: CREATE TABLE test_table (col1 STRING) STORED AS TEXTFILE
+PREHOOK: query: -- CREATE table in non-default DB
+CREATE TABLE test_table (col1 STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table (col1 STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- CREATE table in non-default DB
+CREATE TABLE test_table (col1 STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: test_db@test_table
 PREHOOK: query: SHOW TABLES
@@ -101,25 +123,31 @@ PREHOOK: type: SHOWTABLES
 POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 test_table
-PREHOOK: query: DESCRIBE test_table
+PREHOOK: query: -- DESCRIBE table in non-default DB
+DESCRIBE test_table
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE test_table
+POSTHOOK: query: -- DESCRIBE table in non-default DB
+DESCRIBE test_table
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 col1                	string              	None                
-PREHOOK: query: DESCRIBE EXTENDED test_table
+PREHOOK: query: -- DESCRIBE EXTENDED in non-default DB
+DESCRIBE EXTENDED test_table
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE EXTENDED test_table
+POSTHOOK: query: -- DESCRIBE EXTENDED in non-default DB
+DESCRIBE EXTENDED test_table
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 col1                	string              	None                
 	 	 
 #### A masked pattern was here ####
-PREHOOK: query: CREATE TABLE test_table_like LIKE test_table
+PREHOOK: query: -- CREATE LIKE in non-default DB
+CREATE TABLE test_table_like LIKE test_table
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table_like LIKE test_table
+POSTHOOK: query: -- CREATE LIKE in non-default DB
+CREATE TABLE test_table_like LIKE test_table
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: test_db@test_table_like
 PREHOOK: query: SHOW TABLES
@@ -137,11 +165,13 @@ POSTHOOK: type: DESCTABLE
 col1                	string              	None                
 	 	 
 #### A masked pattern was here ####
-PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/test.dat'
+PREHOOK: query: -- LOAD and SELECT
+LOAD DATA LOCAL INPATH '../data/files/test.dat'
 OVERWRITE INTO TABLE test_table
 PREHOOK: type: LOAD
 PREHOOK: Output: test_db@test_table
-POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/test.dat'
+POSTHOOK: query: -- LOAD and SELECT
+LOAD DATA LOCAL INPATH '../data/files/test.dat'
 OVERWRITE INTO TABLE test_table
 POSTHOOK: type: LOAD
 POSTHOOK: Output: test_db@test_table
@@ -159,11 +189,13 @@ POSTHOOK: Input: test_db@test_table
 4
 5
 6
-PREHOOK: query: DROP TABLE test_table
+PREHOOK: query: -- DROP and CREATE w/o LOAD
+DROP TABLE test_table
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: test_db@test_table
 PREHOOK: Output: test_db@test_table
-POSTHOOK: query: DROP TABLE test_table
+POSTHOOK: query: -- DROP and CREATE w/o LOAD
+DROP TABLE test_table
 POSTHOOK: type: DROPTABLE
 POSTHOOK: Input: test_db@test_table
 POSTHOOK: Output: test_db@test_table
@@ -191,9 +223,11 @@ POSTHOOK: query: SELECT * FROM test_tabl
 POSTHOOK: type: QUERY
 POSTHOOK: Input: test_db@test_table
 #### A masked pattern was here ####
-PREHOOK: query: USE test_db
+PREHOOK: query: -- CREATE table that already exists in DEFAULT
+USE test_db
 PREHOOK: type: SWITCHDATABASE
-POSTHOOK: query: USE test_db
+POSTHOOK: query: -- CREATE table that already exists in DEFAULT
+USE test_db
 POSTHOOK: type: SWITCHDATABASE
 PREHOOK: query: CREATE TABLE src (col1 STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
@@ -237,9 +271,11 @@ POSTHOOK: Input: default@src
 278	val_278
 98	val_98
 484	val_484
-PREHOOK: query: USE test_db
+PREHOOK: query: -- DROP DATABASE
+USE test_db
 PREHOOK: type: SWITCHDATABASE
-POSTHOOK: query: USE test_db
+POSTHOOK: query: -- DROP DATABASE
+USE test_db
 POSTHOOK: type: SWITCHDATABASE
 PREHOOK: query: DROP TABLE src
 PREHOOK: type: DROPTABLE
@@ -282,9 +318,11 @@ PREHOOK: type: SHOWDATABASES
 POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
-PREHOOK: query: CREATE DATABASE to_drop_db1
+PREHOOK: query: -- DROP EMPTY DATABASE CASCADE
+CREATE DATABASE to_drop_db1
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE to_drop_db1
+POSTHOOK: query: -- DROP EMPTY DATABASE CASCADE
+CREATE DATABASE to_drop_db1
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -305,9 +343,11 @@ PREHOOK: type: SHOWDATABASES
 POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 default
-PREHOOK: query: CREATE DATABASE to_drop_db2
+PREHOOK: query: -- DROP NON-EMPTY DATABASE CASCADE
+CREATE DATABASE to_drop_db2
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE to_drop_db2
+POSTHOOK: query: -- DROP NON-EMPTY DATABASE CASCADE
+CREATE DATABASE to_drop_db2
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -354,9 +394,11 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 default
-PREHOOK: query: CREATE DATABASE to_drop_db3
+PREHOOK: query: -- DROP NON-EMPTY DATABASE CASCADE IF EXISTS
+CREATE DATABASE to_drop_db3
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE to_drop_db3
+POSTHOOK: query: -- DROP NON-EMPTY DATABASE CASCADE IF EXISTS
+CREATE DATABASE to_drop_db3
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 PREHOOK: query: SHOW DATABASES
@@ -393,9 +435,11 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 default
-PREHOOK: query: DROP DATABASE IF EXISTS non_exists_db3 CASCADE
+PREHOOK: query: -- DROP NON-EXISTING DATABASE CASCADE IF EXISTS
+DROP DATABASE IF EXISTS non_exists_db3 CASCADE
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE IF EXISTS non_exists_db3 CASCADE
+POSTHOOK: query: -- DROP NON-EXISTING DATABASE CASCADE IF EXISTS
+DROP DATABASE IF EXISTS non_exists_db3 CASCADE
 POSTHOOK: type: DROPDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 PREHOOK: query: SHOW DATABASES
@@ -404,14 +448,18 @@ POSTHOOK: query: SHOW DATABASES
 POSTHOOK: type: SHOWDATABASES
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 default
-PREHOOK: query: DROP DATABASE IF EXISTS non_exists_db3 RESTRICT
+PREHOOK: query: -- DROP NON-EXISTING DATABASE RESTRICT IF EXISTS
+DROP DATABASE IF EXISTS non_exists_db3 RESTRICT
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE IF EXISTS non_exists_db3 RESTRICT
+POSTHOOK: query: -- DROP NON-EXISTING DATABASE RESTRICT IF EXISTS
+DROP DATABASE IF EXISTS non_exists_db3 RESTRICT
 POSTHOOK: type: DROPDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: CREATE DATABASE to_drop_db4
+PREHOOK: query: -- DROP EMPTY DATABASE RESTRICT
+CREATE DATABASE to_drop_db4
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE to_drop_db4
+POSTHOOK: query: -- DROP EMPTY DATABASE RESTRICT
+CREATE DATABASE to_drop_db4
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 PREHOOK: query: SHOW DATABASES
@@ -433,13 +481,13 @@ POSTHOOK: type: SHOWDATABASES
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 default
 PREHOOK: query: --
-
+-- Canonical Name Tests
 --
 
 CREATE DATABASE db1
 PREHOOK: type: CREATEDATABASE
 POSTHOOK: query: --
-
+-- Canonical Name Tests
 --
 
 CREATE DATABASE db1
@@ -450,28 +498,34 @@ PREHOOK: type: CREATEDATABASE
 POSTHOOK: query: CREATE DATABASE db2
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: CREATE TABLE db1.src(key STRING, value STRING)
+PREHOOK: query: -- CREATE foreign table
+CREATE TABLE db1.src(key STRING, value STRING)
 STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE db1.src(key STRING, value STRING)
+POSTHOOK: query: -- CREATE foreign table
+CREATE TABLE db1.src(key STRING, value STRING)
 STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db1@src
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
+PREHOOK: query: -- LOAD into foreign table
+LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
 OVERWRITE INTO TABLE db1.src
 PREHOOK: type: LOAD
 PREHOOK: Output: db1@src
-POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
+POSTHOOK: query: -- LOAD into foreign table
+LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
 OVERWRITE INTO TABLE db1.src
 POSTHOOK: type: LOAD
 POSTHOOK: Output: db1@src
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: SELECT * FROM db1.src
+PREHOOK: query: -- SELECT from foreign table
+SELECT * FROM db1.src
 PREHOOK: type: QUERY
 PREHOOK: Input: db1@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM db1.src
+POSTHOOK: query: -- SELECT from foreign table
+SELECT * FROM db1.src
 POSTHOOK: type: QUERY
 POSTHOOK: Input: db1@src
 #### A masked pattern was here ####
@@ -976,35 +1030,41 @@ POSTHOOK: Lineage: temp_tbl2.c EXPRESSIO
 400	val_400
 200	val_200
 97	val_97
-PREHOOK: query: CREATE TABLE db1.srcpart(key STRING, value STRING)
+PREHOOK: query: -- CREATE Partitioned foreign table
+CREATE TABLE db1.srcpart(key STRING, value STRING)
 PARTITIONED BY (ds STRING, hr STRING)
 STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE db1.srcpart(key STRING, value STRING)
+POSTHOOK: query: -- CREATE Partitioned foreign table
+CREATE TABLE db1.srcpart(key STRING, value STRING)
 PARTITIONED BY (ds STRING, hr STRING)
 STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db1@srcpart
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
+PREHOOK: query: -- LOAD data into Partitioned foreign table
+LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
 OVERWRITE INTO TABLE db1.srcpart
 PARTITION (ds='2008-04-08', hr='11')
 PREHOOK: type: LOAD
 PREHOOK: Output: db1@srcpart
-POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
+POSTHOOK: query: -- LOAD data into Partitioned foreign table
+LOAD DATA LOCAL INPATH '../data/files/kv1.txt'
 OVERWRITE INTO TABLE db1.srcpart
 PARTITION (ds='2008-04-08', hr='11')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: db1@srcpart
 POSTHOOK: Output: db1@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: SELECT key, value FROM db1.srcpart
+PREHOOK: query: -- SELECT from Partitioned foreign table
+SELECT key, value FROM db1.srcpart
 WHERE key < 100 AND ds='2008-04-08' AND hr='11'
 PREHOOK: type: QUERY
 PREHOOK: Input: db1@srcpart
 PREHOOK: Input: db1@srcpart@ds=2008-04-08/hr=11
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key, value FROM db1.srcpart
+POSTHOOK: query: -- SELECT from Partitioned foreign table
+SELECT key, value FROM db1.srcpart
 WHERE key < 100 AND ds='2008-04-08' AND hr='11'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: db1@srcpart
@@ -1095,9 +1155,11 @@ POSTHOOK: Lineage: temp_tbl2.c EXPRESSIO
 37	val_37
 90	val_90
 97	val_97
-PREHOOK: query: USE db2
+PREHOOK: query: -- SELECT JOINed product of two foreign tables
+USE db2
 PREHOOK: type: SWITCHDATABASE
-POSTHOOK: query: USE db2
+POSTHOOK: query: -- SELECT JOINed product of two foreign tables
+USE db2
 POSTHOOK: type: SWITCHDATABASE
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 PREHOOK: query: SELECT a.* FROM db1.src a JOIN default.src1 b
@@ -1150,27 +1212,32 @@ POSTHOOK: Lineage: temp_tbl2.c EXPRESSIO
 66	val_66
 98	val_98
 98	val_98
-PREHOOK: query: CREATE TABLE conflict_name AS
+PREHOOK: query: -- CREATE TABLE AS SELECT from foreign table
+CREATE TABLE conflict_name AS
 SELECT value FROM default.src WHERE key = 66
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: CREATE TABLE conflict_name AS
+POSTHOOK: query: -- CREATE TABLE AS SELECT from foreign table
+CREATE TABLE conflict_name AS
 SELECT value FROM default.src WHERE key = 66
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: db2@conflict_name
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: CREATE TABLE db1.conflict_name AS
+PREHOOK: query: -- CREATE foreign table
+CREATE TABLE db1.conflict_name AS
 SELECT value FROM db1.src WHERE key = 8
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: db1@src
-POSTHOOK: query: CREATE TABLE db1.conflict_name AS
+POSTHOOK: query: -- CREATE foreign table
+CREATE TABLE db1.conflict_name AS
 SELECT value FROM db1.src WHERE key = 8
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: db1@src
 POSTHOOK: Output: db1@conflict_name
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
-PREHOOK: query: SELECT * FROM (
+PREHOOK: query: -- query tables with the same names in different DBs
+SELECT * FROM (
   SELECT value FROM db1.conflict_name
 UNION ALL
   SELECT value FROM conflict_name
@@ -1179,7 +1246,8 @@ PREHOOK: type: QUERY
 PREHOOK: Input: db1@conflict_name
 PREHOOK: Input: db2@conflict_name
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM (
+POSTHOOK: query: -- query tables with the same names in different DBs
+SELECT * FROM (
   SELECT value FROM db1.conflict_name
 UNION ALL
   SELECT value FROM conflict_name
@@ -1217,10 +1285,12 @@ POSTHOOK: Input: db2@conflict_name
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 val_66
 val_8
-PREHOOK: query: CREATE TABLE bucketized_src (key INT, value STRING)
+PREHOOK: query: -- TABLESAMPLES
+CREATE TABLE bucketized_src (key INT, value STRING)
 CLUSTERED BY (key) SORTED BY (key) INTO 1 BUCKETS
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucketized_src (key INT, value STRING)
+POSTHOOK: query: -- TABLESAMPLES
+CREATE TABLE bucketized_src (key INT, value STRING)
 CLUSTERED BY (key) SORTED BY (key) INTO 1 BUCKETS
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucketized_src
@@ -1250,9 +1320,11 @@ POSTHOOK: Lineage: bucketized_src.key EX
 POSTHOOK: Lineage: bucketized_src.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: temp_tbl2.c EXPRESSION [(temp_tbl)temp_tbl.null, ]
 66
-PREHOOK: query: CREATE TABLE db2.src1 LIKE default.src
+PREHOOK: query: -- CREATE TABLE LIKE
+CREATE TABLE db2.src1 LIKE default.src
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE db2.src1 LIKE default.src
+POSTHOOK: query: -- CREATE TABLE LIKE
+CREATE TABLE db2.src1 LIKE default.src
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db2@src1
 POSTHOOK: Lineage: bucketized_src.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
@@ -1278,11 +1350,13 @@ key                 	string             
 value               	string              	default             
 	 	 
 #### A masked pattern was here ####
-PREHOOK: query: SELECT key FROM `default`.src ORDER BY key LIMIT 1
+PREHOOK: query: -- character escaping
+SELECT key FROM `default`.src ORDER BY key LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT key FROM `default`.src ORDER BY key LIMIT 1
+POSTHOOK: query: -- character escaping
+SELECT key FROM `default`.src ORDER BY key LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/database_drop.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,18 @@
-PREHOOK: query: CREATE DATABASE db5
+PREHOOK: query: -- create database with multiple tables, indexes and views.
+-- Use both partitioned and non-partitioned tables, as well as
+-- tables and indexes with specific storage locations
+-- verify the drop the database with cascade works and that the directories
+-- outside the database's default storage are removed as part of the drop
+
+CREATE DATABASE db5
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE db5
+POSTHOOK: query: -- create database with multiple tables, indexes and views.
+-- Use both partitioned and non-partitioned tables, as well as
+-- tables and indexes with specific storage locations
+-- verify the drop the database with cascade works and that the directories
+-- outside the database's default storage are removed as part of the drop
+
+CREATE DATABASE db5
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES
@@ -13,9 +25,11 @@ PREHOOK: type: SWITCHDATABASE
 POSTHOOK: query: USE db5
 POSTHOOK: type: SWITCHDATABASE
 #### A masked pattern was here ####
-PREHOOK: query: CREATE TABLE temp_tbl (id INT, name STRING)
+PREHOOK: query: -- add a table, index and view
+CREATE TABLE temp_tbl (id INT, name STRING)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE temp_tbl (id INT, name STRING)
+POSTHOOK: query: -- add a table, index and view
+CREATE TABLE temp_tbl (id INT, name STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db5@temp_tbl
 PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt' INTO TABLE temp_tbl
@@ -45,8 +59,10 @@ POSTHOOK: Output: db5@db5__temp_tbl_idx1
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
+PREHOOK: query: -- add a table, index and view with a different storage location
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
+POSTHOOK: query: -- add a table, index and view with a different storage location
 #### A masked pattern was here ####
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db5@temp_tbl2
@@ -92,9 +108,11 @@ POSTHOOK: Lineage: db5__temp_tbl2_idx2__
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
-PREHOOK: query: CREATE TABLE part_tab (id INT, name STRING)  PARTITIONED BY (ds string)
+PREHOOK: query: -- add a partitioned table, index and view
+CREATE TABLE part_tab (id INT, name STRING)  PARTITIONED BY (ds string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part_tab (id INT, name STRING)  PARTITIONED BY (ds string)
+POSTHOOK: query: -- add a partitioned table, index and view
+CREATE TABLE part_tab (id INT, name STRING)  PARTITIONED BY (ds string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db5@part_tab
 POSTHOOK: Lineage: db5__temp_tbl2_idx2__._bucketname SIMPLE [(temp_tbl2)temp_tbl2.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
@@ -181,10 +199,12 @@ POSTHOOK: Lineage: db5__temp_tbl2_idx2__
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
-PREHOOK: query: CREATE TABLE part_tab2 (id INT, name STRING)  PARTITIONED BY (ds string)
+PREHOOK: query: -- add a partitioned table, index and view with a different storage location
+CREATE TABLE part_tab2 (id INT, name STRING)  PARTITIONED BY (ds string)
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part_tab2 (id INT, name STRING)  PARTITIONED BY (ds string)
+POSTHOOK: query: -- add a partitioned table, index and view with a different storage location
+CREATE TABLE part_tab2 (id INT, name STRING)  PARTITIONED BY (ds string)
 #### A masked pattern was here ####
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db5@part_tab2
@@ -310,10 +330,12 @@ POSTHOOK: Lineage: db5__temp_tbl2_idx2__
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
-PREHOOK: query: CREATE TABLE part_tab3 (id INT, name STRING)  PARTITIONED BY (ds string)
+PREHOOK: query: -- add a partitioned table, index and view with a different storage location
+CREATE TABLE part_tab3 (id INT, name STRING)  PARTITIONED BY (ds string)
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part_tab3 (id INT, name STRING)  PARTITIONED BY (ds string)
+POSTHOOK: query: -- add a partitioned table, index and view with a different storage location
+CREATE TABLE part_tab3 (id INT, name STRING)  PARTITIONED BY (ds string)
 #### A masked pattern was here ####
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: db5@part_tab3
@@ -500,13 +522,15 @@ POSTHOOK: Lineage: db5__temp_tbl2_idx2__
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
-PREHOOK: query: CREATE EXTERNAL TABLE extab1(id INT, name STRING) ROW FORMAT
+PREHOOK: query: -- add an external table
+CREATE EXTERNAL TABLE extab1(id INT, name STRING) ROW FORMAT
               DELIMITED FIELDS TERMINATED BY ''
               LINES TERMINATED BY '\n'
               STORED AS TEXTFILE
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE EXTERNAL TABLE extab1(id INT, name STRING) ROW FORMAT
+POSTHOOK: query: -- add an external table
+CREATE EXTERNAL TABLE extab1(id INT, name STRING) ROW FORMAT
               DELIMITED FIELDS TERMINATED BY ''
               LINES TERMINATED BY '\n'
               STORED AS TEXTFILE
@@ -537,9 +561,11 @@ POSTHOOK: Lineage: db5__temp_tbl2_idx2__
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._bucketname SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__._offsets EXPRESSION [(temp_tbl)temp_tbl.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]
 POSTHOOK: Lineage: db5__temp_tbl_idx1__.id SIMPLE [(temp_tbl)temp_tbl.FieldSchema(name:id, type:int, comment:null), ]
-PREHOOK: query: DROP DATABASE db5 CASCADE
+PREHOOK: query: -- drop the database with cascade
+DROP DATABASE db5 CASCADE
 PREHOOK: type: DROPDATABASE
-POSTHOOK: query: DROP DATABASE db5 CASCADE
+POSTHOOK: query: -- drop the database with cascade
+DROP DATABASE db5 CASCADE
 POSTHOOK: type: DROPDATABASE
 POSTHOOK: Lineage: db5__part_tab2_idx4__ PARTITION(ds=2008-04-09)._bucketname SIMPLE [(part_tab2)part_tab2.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ]
 POSTHOOK: Lineage: db5__part_tab2_idx4__ PARTITION(ds=2008-04-09)._offsets EXPRESSION [(part_tab2)part_tab2.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/decimal_udf.q.out Wed Apr 10 00:06:55 2013
@@ -19,9 +19,11 @@ PREHOOK: Output: default@decimal_udf
 POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv7.txt' INTO TABLE DECIMAL_UDF
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@decimal_udf
-PREHOOK: query: EXPLAIN SELECT key + key FROM DECIMAL_UDF
+PREHOOK: query: -- addition
+EXPLAIN SELECT key + key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT key + key FROM DECIMAL_UDF
+POSTHOOK: query: -- addition
+EXPLAIN SELECT key + key FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (+ (TOK_TABLE_OR_COL key) (TOK_TABLE_OR_COL key))))))
@@ -343,9 +345,11 @@ POSTHOOK: Input: default@decimal_udf
 1.9999999999999999999999999
 -1234567889.123456789
 1234567891.12345678
-PREHOOK: query: EXPLAIN SELECT key - key FROM DECIMAL_UDF
+PREHOOK: query: -- substraction
+EXPLAIN SELECT key - key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT key - key FROM DECIMAL_UDF
+POSTHOOK: query: -- substraction
+EXPLAIN SELECT key - key FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (- (TOK_TABLE_OR_COL key) (TOK_TABLE_OR_COL key))))))
@@ -667,9 +671,11 @@ POSTHOOK: Input: default@decimal_udf
 -1E-25
 -1234567891.123456789
 1234567889.12345678
-PREHOOK: query: EXPLAIN SELECT key * key FROM DECIMAL_UDF
+PREHOOK: query: -- multiplication
+EXPLAIN SELECT key * key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT key * key FROM DECIMAL_UDF
+POSTHOOK: query: -- multiplication
+EXPLAIN SELECT key * key FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (* (TOK_TABLE_OR_COL key) (TOK_TABLE_OR_COL key))))))
@@ -991,9 +997,11 @@ POSTHOOK: Input: default@decimal_udf
 1.9999999999999999999999998
 -2469135780.246913578
 2469135780.24691356
-PREHOOK: query: EXPLAIN SELECT key / 0 FROM DECIMAL_UDF limit 1
+PREHOOK: query: -- division
+EXPLAIN SELECT key / 0 FROM DECIMAL_UDF limit 1
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT key / 0 FROM DECIMAL_UDF limit 1
+POSTHOOK: query: -- division
+EXPLAIN SELECT key / 0 FROM DECIMAL_UDF limit 1
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (/ (TOK_TABLE_OR_COL key) 0))) (TOK_LIMIT 1)))
@@ -1387,9 +1395,11 @@ POSTHOOK: Input: default@decimal_udf
 0.49999999999999999999999995
 -617283945.0617283945
 617283945.06172839
-PREHOOK: query: EXPLAIN SELECT abs(key) FROM DECIMAL_UDF
+PREHOOK: query: -- abs
+EXPLAIN SELECT abs(key) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT abs(key) FROM DECIMAL_UDF
+POSTHOOK: query: -- abs
+EXPLAIN SELECT abs(key) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION abs (TOK_TABLE_OR_COL key))))))
@@ -1468,9 +1478,11 @@ POSTHOOK: Input: default@decimal_udf
 0.9999999999999999999999999
 1234567890.123456789
 1234567890.12345678
-PREHOOK: query: EXPLAIN SELECT value, sum(key) / count(key), avg(key) FROM DECIMAL_UDF GROUP BY value ORDER BY value
+PREHOOK: query: -- avg
+EXPLAIN SELECT value, sum(key) / count(key), avg(key) FROM DECIMAL_UDF GROUP BY value ORDER BY value
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT value, sum(key) / count(key), avg(key) FROM DECIMAL_UDF GROUP BY value ORDER BY value
+POSTHOOK: query: -- avg
+EXPLAIN SELECT value, sum(key) / count(key), avg(key) FROM DECIMAL_UDF GROUP BY value ORDER BY value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (/ (TOK_FUNCTION sum (TOK_TABLE_OR_COL key)) (TOK_FUNCTION count (TOK_TABLE_OR_COL key)))) (TOK_SELEXPR (TOK_FUNCTION avg (TOK_TABLE_OR_COL key)))) (TOK_GROUPBY (TOK_TABLE_OR_COL value)) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL value)))))
@@ -1605,9 +1617,11 @@ POSTHOOK: Input: default@decimal_udf
 200	2E+2	2E+2
 4400	-4.4E+3	-4.4E+3
 1234567890	1234567890.12345678	1234567890.12345678
-PREHOOK: query: EXPLAIN SELECT -key FROM DECIMAL_UDF
+PREHOOK: query: -- negative
+EXPLAIN SELECT -key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT -key FROM DECIMAL_UDF
+POSTHOOK: query: -- negative
+EXPLAIN SELECT -key FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (- (TOK_TABLE_OR_COL key))))))
@@ -1686,9 +1700,11 @@ POSTHOOK: Input: default@decimal_udf
 -0.9999999999999999999999999
 1234567890.123456789
 -1234567890.12345678
-PREHOOK: query: EXPLAIN SELECT +key FROM DECIMAL_UDF
+PREHOOK: query: -- positive
+EXPLAIN SELECT +key FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT +key FROM DECIMAL_UDF
+POSTHOOK: query: -- positive
+EXPLAIN SELECT +key FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (+ (TOK_TABLE_OR_COL key))))))
@@ -1767,9 +1783,11 @@ POSTHOOK: Input: default@decimal_udf
 0.9999999999999999999999999
 -1234567890.123456789
 1234567890.12345678
-PREHOOK: query: EXPlAIN SELECT CEIL(key) FROM DECIMAL_UDF
+PREHOOK: query: -- ceiling
+EXPlAIN SELECT CEIL(key) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPlAIN SELECT CEIL(key) FROM DECIMAL_UDF
+POSTHOOK: query: -- ceiling
+EXPlAIN SELECT CEIL(key) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION CEIL (TOK_TABLE_OR_COL key))))))
@@ -1848,9 +1866,11 @@ POSTHOOK: Input: default@decimal_udf
 1
 -1.23456789E+9
 1234567891
-PREHOOK: query: EXPLAIN SELECT FLOOR(key) FROM DECIMAL_UDF
+PREHOOK: query: -- floor
+EXPLAIN SELECT FLOOR(key) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT FLOOR(key) FROM DECIMAL_UDF
+POSTHOOK: query: -- floor
+EXPLAIN SELECT FLOOR(key) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION FLOOR (TOK_TABLE_OR_COL key))))))
@@ -1929,9 +1949,11 @@ POSTHOOK: Input: default@decimal_udf
 0
 -1234567891
 1.23456789E+9
-PREHOOK: query: EXPLAIN SELECT ROUND(key, 2) FROM DECIMAL_UDF
+PREHOOK: query: -- round
+EXPLAIN SELECT ROUND(key, 2) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT ROUND(key, 2) FROM DECIMAL_UDF
+POSTHOOK: query: -- round
+EXPLAIN SELECT ROUND(key, 2) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION ROUND (TOK_TABLE_OR_COL key) 2)))))
@@ -2010,9 +2032,11 @@ POSTHOOK: Input: default@decimal_udf
 1
 -1234567890.12
 1234567890.12
-PREHOOK: query: EXPLAIN SELECT POWER(key, 2) FROM DECIMAL_UDF
+PREHOOK: query: -- power
+EXPLAIN SELECT POWER(key, 2) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT POWER(key, 2) FROM DECIMAL_UDF
+POSTHOOK: query: -- power
+EXPLAIN SELECT POWER(key, 2) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION POWER (TOK_TABLE_OR_COL key) 2)))))
@@ -2091,9 +2115,11 @@ POSTHOOK: Input: default@decimal_udf
 0.99999999999999999999999980000000000000000000000001
 1524157875323883675.019051998750190521
 1524157875323883652.7968299765279684
-PREHOOK: query: EXPLAIN SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
+PREHOOK: query: -- modulo
+EXPLAIN SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
+POSTHOOK: query: -- modulo
+EXPLAIN SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (% (+ (TOK_TABLE_OR_COL key) 1) (/ (TOK_TABLE_OR_COL key) 2))))))
@@ -2172,9 +2198,11 @@ NULL
 1E-25
 -617283944.0617283945
 1
-PREHOOK: query: EXPLAIN SELECT value, stddev(key), variance(key) FROM DECIMAL_UDF GROUP BY value
+PREHOOK: query: -- stddev, var
+EXPLAIN SELECT value, stddev(key), variance(key) FROM DECIMAL_UDF GROUP BY value
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT value, stddev(key), variance(key) FROM DECIMAL_UDF GROUP BY value
+POSTHOOK: query: -- stddev, var
+EXPLAIN SELECT value, stddev(key), variance(key) FROM DECIMAL_UDF GROUP BY value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (TOK_FUNCTION stddev (TOK_TABLE_OR_COL key))) (TOK_SELEXPR (TOK_FUNCTION variance (TOK_TABLE_OR_COL key)))) (TOK_GROUPBY (TOK_TABLE_OR_COL value))))
@@ -2278,9 +2306,11 @@ POSTHOOK: Input: default@decimal_udf
 200	0.0	0.0
 4400	0.0	0.0
 1234567890	0.0	0.0
-PREHOOK: query: EXPLAIN SELECT value, stddev_samp(key), var_samp(key) FROM DECIMAL_UDF GROUP BY value
+PREHOOK: query: -- stddev_samp, var_samp
+EXPLAIN SELECT value, stddev_samp(key), var_samp(key) FROM DECIMAL_UDF GROUP BY value
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT value, stddev_samp(key), var_samp(key) FROM DECIMAL_UDF GROUP BY value
+POSTHOOK: query: -- stddev_samp, var_samp
+EXPLAIN SELECT value, stddev_samp(key), var_samp(key) FROM DECIMAL_UDF GROUP BY value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (TOK_FUNCTION stddev_samp (TOK_TABLE_OR_COL key))) (TOK_SELEXPR (TOK_FUNCTION var_samp (TOK_TABLE_OR_COL key)))) (TOK_GROUPBY (TOK_TABLE_OR_COL value))))
@@ -2384,9 +2414,11 @@ POSTHOOK: Input: default@decimal_udf
 200	0.0	0.0
 4400	0.0	0.0
 1234567890	0.0	0.0
-PREHOOK: query: EXPLAIN SELECT histogram_numeric(key, 3) FROM DECIMAL_UDF
+PREHOOK: query: -- histogram
+EXPLAIN SELECT histogram_numeric(key, 3) FROM DECIMAL_UDF
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT histogram_numeric(key, 3) FROM DECIMAL_UDF
+POSTHOOK: query: -- histogram
+EXPLAIN SELECT histogram_numeric(key, 3) FROM DECIMAL_UDF
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME DECIMAL_UDF))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION histogram_numeric (TOK_TABLE_OR_COL key) 3)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_comment_indent.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_comment_indent.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_comment_indent.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_comment_indent.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,6 @@
-PREHOOK: query: CREATE TABLE test_table(
+PREHOOK: query: -- test comment indent processing for multi-line comments
+
+CREATE TABLE test_table(
     col1 INT COMMENT 'col1 one line comment',
     col2 STRING COMMENT 'col2
 two lines comment',
@@ -8,7 +10,9 @@ comment') 
 COMMENT 'table comment
 two lines'
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table(
+POSTHOOK: query: -- test comment indent processing for multi-line comments
+
+CREATE TABLE test_table(
     col1 INT COMMENT 'col1 one line comment',
     col2 STRING COMMENT 'col2
 two lines comment',

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_pretty.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_pretty.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_pretty.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_pretty.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,6 @@
-PREHOOK: query: CREATE TABLE test_table(
+PREHOOK: query: -- test comment indent processing for multi-line comments
+
+CREATE TABLE test_table(
     col1 INT COMMENT 'col1 one line comment',
     col2 STRING COMMENT 'col2
 two lines comment',
@@ -14,7 +16,9 @@ adipiscing tortor. Integer venenatis',
 COMMENT 'table comment
 two lines'
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table(
+POSTHOOK: query: -- test comment indent processing for multi-line comments
+
+CREATE TABLE test_table(
     col1 INT COMMENT 'col1 one line comment',
     col2 STRING COMMENT 'col2
 two lines comment',
@@ -31,9 +35,37 @@ COMMENT 'table comment
 two lines'
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_table
-PREHOOK: query: DESCRIBE PRETTY test_table
+PREHOOK: query: -- There will be an extra tab at the end of each comment line in the output.
+-- This is because DESCRIBE <table_name> command separates the column, type and
+-- comment field using a \t. DESCRIBE PRETTY <table_name> uses spaces instead 
+-- of \t to separate columns. Hive gets confused when it parses the string
+-- table description constructed in MetaDataPrettyFormatUtils, and adds a tab
+-- at the end of each line.
+-- There are three ways to address this:
+-- 1. Pad each row to the full terminal width with extra spaces. 
+-- 2. Assume a maximum tab width of 8, and subtract 2 * 8 spaces from the 
+--    available line width. This approach wastes upto 2 * 8 - 2 columns.
+-- 3. Since the pretty output is meant only for human consumption, do nothing. 
+--    Just add a comment to the unit test file explaining what is happening.
+--    This is the approach chosen.
+
+DESCRIBE PRETTY test_table
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE PRETTY test_table
+POSTHOOK: query: -- There will be an extra tab at the end of each comment line in the output.
+-- This is because DESCRIBE <table_name> command separates the column, type and
+-- comment field using a \t. DESCRIBE PRETTY <table_name> uses spaces instead 
+-- of \t to separate columns. Hive gets confused when it parses the string
+-- table description constructed in MetaDataPrettyFormatUtils, and adds a tab
+-- at the end of each line.
+-- There are three ways to address this:
+-- 1. Pad each row to the full terminal width with extra spaces. 
+-- 2. Assume a maximum tab width of 8, and subtract 2 * 8 spaces from the 
+--    available line width. This approach wastes upto 2 * 8 - 2 columns.
+-- 3. Since the pretty output is meant only for human consumption, do nothing. 
+--    Just add a comment to the unit test file explaining what is happening.
+--    This is the approach chosen.
+
+DESCRIBE PRETTY test_table
 POSTHOOK: type: DESCTABLE
 col_name           data_type     comment	 	 
 	 	 

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_syntax.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_syntax.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_syntax.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_syntax.q.out Wed Apr 10 00:06:55 2013
@@ -32,9 +32,11 @@ POSTHOOK: query: ALTER TABLE t1 ADD PART
 POSTHOOK: type: ALTERTABLE_ADDPARTS
 POSTHOOK: Input: db1@t1
 POSTHOOK: Output: db1@t1@ds=4/part=5
-PREHOOK: query: DESCRIBE t1
+PREHOOK: query: -- describe table
+DESCRIBE t1
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE t1
+POSTHOOK: query: -- describe table
+DESCRIBE t1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -101,9 +103,11 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: DESCRIBE db1.t1
+PREHOOK: query: -- describe database.table
+DESCRIBE db1.t1
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE db1.t1
+POSTHOOK: query: -- describe database.table
+DESCRIBE db1.t1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -170,9 +174,11 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: DESCRIBE t1 key1
+PREHOOK: query: -- describe table column
+DESCRIBE t1 key1
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE t1 key1
+POSTHOOK: query: -- describe table column
+DESCRIBE t1 key1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -191,9 +197,11 @@ POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 key1                	int                 	from deserializer   
-PREHOOK: query: DESCRIBE db1.t1 key1
+PREHOOK: query: -- describe database.tabe column
+DESCRIBE db1.t1 key1
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE db1.t1 key1
+POSTHOOK: query: -- describe database.tabe column
+DESCRIBE db1.t1 key1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -212,9 +220,15 @@ POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 key1                	int                 	from deserializer   
-PREHOOK: query: DESCRIBE t1.key1
-PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE t1.key1
+PREHOOK: query: -- describe table.column
+-- after first checking t1.key1 for database.table not valid
+-- fall back to the old syntax table.column
+DESCRIBE t1.key1
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: -- describe table.column
+-- after first checking t1.key1 for database.table not valid
+-- fall back to the old syntax table.column
+DESCRIBE t1.key1
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -233,9 +247,11 @@ POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 key1                	int                 	from deserializer   
-PREHOOK: query: DESCRIBE t1 PARTITION(ds='4', part='5')
+PREHOOK: query: -- describe table partition
+DESCRIBE t1 PARTITION(ds='4', part='5')
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE t1 PARTITION(ds='4', part='5')
+POSTHOOK: query: -- describe table partition
+DESCRIBE t1 PARTITION(ds='4', part='5')
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
@@ -302,9 +318,11 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: DESCRIBE db1.t1 PARTITION(ds='4', part='5')
+PREHOOK: query: -- describe database.table partition
+DESCRIBE db1.t1 PARTITION(ds='4', part='5')
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: DESCRIBE db1.t1 PARTITION(ds='4', part='5')
+POSTHOOK: query: -- describe database.table partition
+DESCRIBE db1.t1 PARTITION(ds='4', part='5')
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 

Modified: hive/trunk/ql/src/test/results/clientpositive/describe_xpath.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/describe_xpath.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/describe_xpath.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/describe_xpath.q.out Wed Apr 10 00:06:55 2013
@@ -1,43 +1,55 @@
-PREHOOK: query: describe src_thrift.lint
+PREHOOK: query: -- Describe a list structure in a thrift table
+describe src_thrift.lint
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.lint
+POSTHOOK: query: -- Describe a list structure in a thrift table
+describe src_thrift.lint
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 lint                	array<int>          	from deserializer   
-PREHOOK: query: describe src_thrift.lint.$elem$
+PREHOOK: query: -- Describe the element of a list
+describe src_thrift.lint.$elem$
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.lint.$elem$
+POSTHOOK: query: -- Describe the element of a list
+describe src_thrift.lint.$elem$
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 $elem$              	int                 	from deserializer   
-PREHOOK: query: describe src_thrift.mStringString.$key$
+PREHOOK: query: -- Describe the key of a map
+describe src_thrift.mStringString.$key$
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.mStringString.$key$
+POSTHOOK: query: -- Describe the key of a map
+describe src_thrift.mStringString.$key$
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 $key$               	string              	from deserializer   
-PREHOOK: query: describe src_thrift.mStringString.$value$
+PREHOOK: query: -- Describe the value of a map
+describe src_thrift.mStringString.$value$
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.mStringString.$value$
+POSTHOOK: query: -- Describe the value of a map
+describe src_thrift.mStringString.$value$
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 $value$             	string              	from deserializer   
-PREHOOK: query: describe src_thrift.lintString.$elem$
+PREHOOK: query: -- Describe a complex element of a list
+describe src_thrift.lintString.$elem$
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.lintString.$elem$
+POSTHOOK: query: -- Describe a complex element of a list
+describe src_thrift.lintString.$elem$
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 myint               	int                 	from deserializer   
 mystring            	string              	from deserializer   
 underscore_int      	int                 	from deserializer   
-PREHOOK: query: describe src_thrift.lintString.$elem$.myint
+PREHOOK: query: -- Describe a member of an element of a list
+describe src_thrift.lintString.$elem$.myint
 PREHOOK: type: DESCTABLE
-POSTHOOK: query: describe src_thrift.lintString.$elem$.myint
+POSTHOOK: query: -- Describe a member of an element of a list
+describe src_thrift.lintString.$elem$.myint
 POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 

Modified: hive/trunk/ql/src/test/results/clientpositive/diff_part_input_formats.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/diff_part_input_formats.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/diff_part_input_formats.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/diff_part_input_formats.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,12 @@
-PREHOOK: query: CREATE TABLE part_test (key STRING, value STRING) PARTITIONED BY (ds STRING) STORED AS SEQUENCEFILE
+PREHOOK: query: -- Tests the case where a table is changed from sequence file to a RC file,
+-- resulting in partitions in both file formats. If no valid partitions are
+-- selected, then it should still use RC file for reading the dummy partition.
+CREATE TABLE part_test (key STRING, value STRING) PARTITIONED BY (ds STRING) STORED AS SEQUENCEFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part_test (key STRING, value STRING) PARTITIONED BY (ds STRING) STORED AS SEQUENCEFILE
+POSTHOOK: query: -- Tests the case where a table is changed from sequence file to a RC file,
+-- resulting in partitions in both file formats. If no valid partitions are
+-- selected, then it should still use RC file for reading the dummy partition.
+CREATE TABLE part_test (key STRING, value STRING) PARTITIONED BY (ds STRING) STORED AS SEQUENCEFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@part_test
 PREHOOK: query: ALTER TABLE part_test ADD PARTITION(ds='1')

Modified: hive/trunk/ql/src/test/results/clientpositive/driverhook.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/driverhook.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/driverhook.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/driverhook.q.out Wed Apr 10 00:06:55 2013
@@ -1,14 +1,20 @@
 
 
-
-
-
+-- This query should appear in the Hive CLI output.
+-- We test DriverTestHook, which does exactly that.
+-- This should not break.
+SELECT * FROM src LIMIT 1
+PREHOOK: query: -- This query should appear in the Hive CLI output.
+-- We test DriverTestHook, which does exactly that.
+-- This should not break.
 SELECT * FROM src LIMIT 1
-PREHOOK: query: SELECT * FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM src LIMIT 1
+POSTHOOK: query: -- This query should appear in the Hive CLI output.
+-- We test DriverTestHook, which does exactly that.
+-- This should not break.
+SELECT * FROM src LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/drop_database_removes_partition_dirs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/drop_database_removes_partition_dirs.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/drop_database_removes_partition_dirs.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/drop_database_removes_partition_dirs.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,12 @@
-PREHOOK: query: CREATE DATABASE test_database
+PREHOOK: query: -- This test verifies that if a partition exists outside a table's current location when the
+-- database is dropped the partition's location is dropped as well.
+
+CREATE DATABASE test_database
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE test_database
+POSTHOOK: query: -- This test verifies that if a partition exists outside a table's current location when the
+-- database is dropped the partition's location is dropped as well.
+
+CREATE DATABASE test_database
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: USE test_database
 PREHOOK: type: SWITCHDATABASE

Modified: hive/trunk/ql/src/test/results/clientpositive/drop_index_removes_partition_dirs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/drop_index_removes_partition_dirs.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/drop_index_removes_partition_dirs.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/drop_index_removes_partition_dirs.q.out Wed Apr 10 00:06:55 2013
@@ -1,9 +1,15 @@
-PREHOOK: query: CREATE TABLE test_table (key STRING, value STRING)
+PREHOOK: query: -- This test verifies that if a partition exists outside an index table's current location when the
+-- index is dropped the partition's location is dropped as well.
+
+CREATE TABLE test_table (key STRING, value STRING)
 PARTITIONED BY (part STRING)
 STORED AS RCFILE
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table (key STRING, value STRING)
+POSTHOOK: query: -- This test verifies that if a partition exists outside an index table's current location when the
+-- index is dropped the partition's location is dropped as well.
+
+CREATE TABLE test_table (key STRING, value STRING)
 PARTITIONED BY (part STRING)
 STORED AS RCFILE
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/drop_partitions_ignore_protection.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/drop_partitions_ignore_protection.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/drop_partitions_ignore_protection.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/drop_partitions_ignore_protection.q.out Wed Apr 10 00:06:55 2013
@@ -35,11 +35,15 @@ p                   	string             
 p                   	string              	None                
 	 	 
 #### A masked pattern was here ####
-PREHOOK: query: alter table tbl_protectmode_no_drop drop partition (p='p1') ignore protection
+PREHOOK: query: -- The partition will be dropped, even though we have enabled no_drop
+-- as 'ignore protection' has been specified in the command predicate
+alter table tbl_protectmode_no_drop drop partition (p='p1') ignore protection
 PREHOOK: type: ALTERTABLE_DROPPARTS
 PREHOOK: Input: default@tbl_protectmode_no_drop
 PREHOOK: Output: default@tbl_protectmode_no_drop@p=p1
-POSTHOOK: query: alter table tbl_protectmode_no_drop drop partition (p='p1') ignore protection
+POSTHOOK: query: -- The partition will be dropped, even though we have enabled no_drop
+-- as 'ignore protection' has been specified in the command predicate
+alter table tbl_protectmode_no_drop drop partition (p='p1') ignore protection
 POSTHOOK: type: ALTERTABLE_DROPPARTS
 POSTHOOK: Input: default@tbl_protectmode_no_drop
 POSTHOOK: Output: default@tbl_protectmode_no_drop@p=p1

Modified: hive/trunk/ql/src/test/results/clientpositive/drop_table_removes_partition_dirs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/drop_table_removes_partition_dirs.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/drop_table_removes_partition_dirs.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/drop_table_removes_partition_dirs.q.out Wed Apr 10 00:06:55 2013
@@ -1,9 +1,15 @@
-PREHOOK: query: CREATE TABLE test_table (key STRING, value STRING)
+PREHOOK: query: -- This test verifies that if a partition exists outside the table's current location when the
+-- table is dropped the partition's location is dropped as well.
+
+CREATE TABLE test_table (key STRING, value STRING)
 PARTITIONED BY (part STRING)
 STORED AS RCFILE
 #### A masked pattern was here ####
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table (key STRING, value STRING)
+POSTHOOK: query: -- This test verifies that if a partition exists outside the table's current location when the
+-- table is dropped the partition's location is dropped as well.
+
+CREATE TABLE test_table (key STRING, value STRING)
 PARTITIONED BY (part STRING)
 STORED AS RCFILE
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/escape_clusterby1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/escape_clusterby1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/escape_clusterby1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/escape_clusterby1.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,9 @@
-PREHOOK: query: explain
+PREHOOK: query: -- escaped column names in cluster by are not working jira 3267
+explain
 select key, value from src cluster by key, value
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- escaped column names in cluster by are not working jira 3267
+explain
 select key, value from src cluster by key, value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:

Modified: hive/trunk/ql/src/test/results/clientpositive/escape_distributeby1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/escape_distributeby1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/escape_distributeby1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/escape_distributeby1.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,9 @@
-PREHOOK: query: explain
+PREHOOK: query: -- escaped column names in distribute by by are not working jira 3267
+explain
 select key, value from src distribute by key, value
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- escaped column names in distribute by by are not working jira 3267
+explain
 select key, value from src distribute by key, value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:



Mime
View raw message