hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1466300 [7/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/infer_bucket_sort_convert_join.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_convert_join.q.out Wed Apr 10 00:06:55 2013
@@ -1,14 +1,24 @@
-PREHOOK: query: CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
+PREHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata.  In particular, those cases
+-- where joins may be auto converted to map joins.
+
+CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
+POSTHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata.  In particular, those cases
+-- where joins may be auto converted to map joins.
+
+CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_table
-PREHOOK: query: INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
+PREHOOK: query: -- Tests a join which is converted to a map join, the output should be neither bucketed nor sorted
+INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
 SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table@part=1
-POSTHOOK: query: INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
+POSTHOOK: query: -- Tests a join which is converted to a map join, the output should be neither bucketed nor sorted
+INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
 SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
@@ -55,7 +65,10 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
+PREHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin.
+-- Tests a join which is not converted to a map join, the output should be bucketed and sorted.
+
+INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
 SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -72,7 +85,10 @@ Logs:
 #### A masked pattern was here ####
 FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.MapredLocalTask
 ATTEMPT: Execute BackupTask: org.apache.hadoop.hive.ql.exec.MapRedTask
-POSTHOOK: query: INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
+POSTHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin.
+-- Tests a join which is not converted to a map join, the output should be bucketed and sorted.
+
+INSERT OVERWRITE TABLE test_table PARTITION (part = '1') 
 SELECT a.key, b.value FROM src a JOIN src b ON a.key = b.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src

Modified: hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_grouping_operators.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_grouping_operators.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_grouping_operators.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_grouping_operators.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,14 @@
-PREHOOK: query: CREATE TABLE test_table_out (key STRING, value STRING, agg STRING) PARTITIONED BY (part STRING)
+PREHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata, in particular, this tests
+-- the grouping operators rollup/cube/grouping sets
+
+CREATE TABLE test_table_out (key STRING, value STRING, agg STRING) PARTITIONED BY (part STRING)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table_out (key STRING, value STRING, agg STRING) PARTITIONED BY (part STRING)
+POSTHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata, in particular, this tests
+-- the grouping operators rollup/cube/grouping sets
+
+CREATE TABLE test_table_out (key STRING, value STRING, agg STRING) PARTITIONED BY (part STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_table_out
 PREHOOK: query: CREATE TABLE test_table_out_2 (key STRING, value STRING, grouping_key STRING, agg STRING) PARTITIONED BY (part STRING)
@@ -8,10 +16,12 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE test_table_out_2 (key STRING, value STRING, grouping_key STRING, agg STRING) PARTITIONED BY (part STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_table_out_2
-PREHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+PREHOOK: query: -- Test rollup, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value WITH ROLLUP
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+POSTHOOK: query: -- Test rollup, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value WITH ROLLUP
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
@@ -172,12 +182,16 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+PREHOOK: query: -- Test rollup, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value WITH ROLLUP
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table_out_2@part=1
-POSTHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+POSTHOOK: query: -- Test rollup, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value WITH ROLLUP
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
@@ -236,10 +250,12 @@ Bucket Columns:     	[key, value, groupi
 Sort Columns:       	[Order(col:key, order:1), Order(col:value, order:1), Order(col:grouping_key, order:1)]	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+PREHOOK: query: -- Test cube, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value WITH CUBE
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+POSTHOOK: query: -- Test cube, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value WITH CUBE
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: test_table_out PARTITION(part=1).agg EXPRESSION [(src)src.null, ]
@@ -421,12 +437,16 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+PREHOOK: query: -- Test cube, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value WITH CUBE
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table_out_2@part=1
-POSTHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+POSTHOOK: query: -- Test cube, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value WITH CUBE
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
@@ -499,10 +519,12 @@ Bucket Columns:     	[key, value, groupi
 Sort Columns:       	[Order(col:key, order:1), Order(col:value, order:1), Order(col:grouping_key, order:1)]	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+PREHOOK: query: -- Test grouping sets, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value GROUPING SETS (key, value)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
+POSTHOOK: query: -- Test grouping sets, should not be bucketed or sorted because its missing the grouping ID
+EXPLAIN INSERT OVERWRITE TABLE test_table_out PARTITION (part = '1') 
 SELECT key, value, count(1) FROM src GROUP BY key, value GROUPING SETS (key, value)
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: test_table_out PARTITION(part=1).agg EXPRESSION [(src)src.null, ]
@@ -705,12 +727,16 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+PREHOOK: query: -- Test grouping sets, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value GROUPING SETS (key, value)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table_out_2@part=1
-POSTHOOK: query: INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
+POSTHOOK: query: -- Test grouping sets, should be bucketed and sorted on key, value, grouping_key
+
+INSERT OVERWRITE TABLE test_table_out_2 PARTITION (part = '1') 
 SELECT key, value, GROUPING__ID, count(1) FROM src GROUP BY key, value GROUPING SETS (key, value)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src

Modified: hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_multi_insert.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_multi_insert.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_multi_insert.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/infer_bucket_sort_multi_insert.q.out Wed Apr 10 00:06:55 2013
@@ -1,16 +1,28 @@
-PREHOOK: query: CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
+PREHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata.  In particular, those cases
+-- where multi insert is used.
+
+CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
+POSTHOOK: query: -- This tests inferring how data is bucketed/sorted from the operators in the reducer
+-- and populating that information in partitions' metadata.  In particular, those cases
+-- where multi insert is used.
+
+CREATE TABLE test_table (key STRING, value STRING) PARTITIONED BY (part STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_table
-PREHOOK: query: FROM src
+PREHOOK: query: -- Simple case, neither partition should be bucketed or sorted
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, value
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT value, key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table@part=1
 PREHOOK: Output: default@test_table@part=2
-POSTHOOK: query: FROM src
+POSTHOOK: query: -- Simple case, neither partition should be bucketed or sorted
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, value
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT value, key
 POSTHOOK: type: QUERY
@@ -105,14 +117,18 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: FROM src
+PREHOOK: query: -- The partitions should be bucketed and sorted by different keys
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT COUNT(*), value GROUP BY value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table@part=1
 PREHOOK: Output: default@test_table@part=2
-POSTHOOK: query: FROM src
+POSTHOOK: query: -- The partitions should be bucketed and sorted by different keys
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT COUNT(*), value GROUP BY value
 POSTHOOK: type: QUERY
@@ -219,14 +235,18 @@ Bucket Columns:     	[value]            
 Sort Columns:       	[Order(col:value, order:1)]	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: FROM src
+PREHOOK: query: -- The first partition should be bucketed and sorted, the second should not
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT key, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table@part=1
 PREHOOK: Output: default@test_table@part=2
-POSTHOOK: query: FROM src
+POSTHOOK: query: -- The first partition should be bucketed and sorted, the second should not
+
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT key, value
 POSTHOOK: type: QUERY
@@ -345,14 +365,18 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
-PREHOOK: query: FROM src
+PREHOOK: query: -- Test the multi group by single reducer optimization
+-- Both partitions should be bucketed by key
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT key, SUM(SUBSTR(value, 5)) GROUP BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@test_table@part=1
 PREHOOK: Output: default@test_table@part=2
-POSTHOOK: query: FROM src
+POSTHOOK: query: -- Test the multi group by single reducer optimization
+-- Both partitions should be bucketed by key
+FROM src
 INSERT OVERWRITE TABLE test_table PARTITION (part = '1') SELECT key, COUNT(*) GROUP BY key
 INSERT OVERWRITE TABLE test_table PARTITION (part = '2') SELECT key, SUM(SUBSTR(value, 5)) GROUP BY key
 POSTHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/infer_const_type.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/infer_const_type.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/infer_const_type.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/infer_const_type.q.out Wed Apr 10 00:06:55 2013
@@ -112,7 +112,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@infertypes
 #### A masked pattern was here ####
 127	32767	12345	-12345	906.0	-307.0	1234
-PREHOOK: query: EXPLAIN SELECT * FROM infertypes WHERE
+PREHOOK: query: -- all should return false as all numbers exceeed the largest number 
+-- which could be represented by the corresponding type
+-- and string_col = long_const should return false
+EXPLAIN SELECT * FROM infertypes WHERE
   ti  = '128' OR
   si  = 32768 OR
   i   = '2147483648' OR
@@ -120,7 +123,10 @@ PREHOOK: query: EXPLAIN SELECT * FROM in
   fl  = 'float' OR
   db  = 'double'
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT * FROM infertypes WHERE
+POSTHOOK: query: -- all should return false as all numbers exceeed the largest number 
+-- which could be represented by the corresponding type
+-- and string_col = long_const should return false
+EXPLAIN SELECT * FROM infertypes WHERE
   ti  = '128' OR
   si  = 32768 OR
   i   = '2147483648' OR
@@ -195,12 +201,14 @@ POSTHOOK: query: SELECT * FROM infertype
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@infertypes
 #### A masked pattern was here ####
-PREHOOK: query: EXPLAIN SELECT * FROM infertypes WHERE
+PREHOOK: query: -- for the query like: int_col = double, should return false 
+EXPLAIN SELECT * FROM infertypes WHERE
   ti  = '127.0' OR
   si  = 327.0 OR
   i   = '-100.0'
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT * FROM infertypes WHERE
+POSTHOOK: query: -- for the query like: int_col = double, should return false 
+EXPLAIN SELECT * FROM infertypes WHERE
   ti  = '127.0' OR
   si  = 327.0 OR
   i   = '-100.0'

Modified: hive/trunk/ql/src/test/results/clientpositive/init_file.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/init_file.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/init_file.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/init_file.q.out Wed Apr 10 00:06:55 2013
@@ -3,11 +3,17 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: create table tbl_created_by_init(i int)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@tbl_created_by_init
-PREHOOK: query: select * from tbl_created_by_init
+PREHOOK: query: -- tbl_created_by_init is supposed to have been created for us
+-- automatically by test_init_file.sql
+
+select * from tbl_created_by_init
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tbl_created_by_init
 #### A masked pattern was here ####
-POSTHOOK: query: select * from tbl_created_by_init
+POSTHOOK: query: -- tbl_created_by_init is supposed to have been created for us
+-- automatically by test_init_file.sql
+
+select * from tbl_created_by_init
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tbl_created_by_init
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out Wed Apr 10 00:06:55 2013
@@ -1176,9 +1176,11 @@ POSTHOOK: Lineage: dest_j1.value SIMPLE 
 98	val_98
 98	val_98
 98	val_98
-PREHOOK: query: create table inner(i int)
+PREHOOK: query: -- verify that INNER is a non-reserved word for backwards compatibility
+create table inner(i int)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table inner(i int)
+POSTHOOK: query: -- verify that INNER is a non-reserved word for backwards compatibility
+create table inner(i int)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@inner
 POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/input12_hadoop20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/input12_hadoop20.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/input12_hadoop20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/input12_hadoop20.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
+PREHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest1
 PREHOOK: query: CREATE TABLE dest2(key INT, value STRING) STORED AS TEXTFILE

Modified: hive/trunk/ql/src/test/results/clientpositive/input16.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/input16.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/input16.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/input16.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: DROP TABLE INPUT16
+PREHOOK: query: -- TestSerDe is a user defined serde where the default delimiter is Ctrl-B
+DROP TABLE INPUT16
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: DROP TABLE INPUT16
+POSTHOOK: query: -- TestSerDe is a user defined serde where the default delimiter is Ctrl-B
+DROP TABLE INPUT16
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: CREATE TABLE INPUT16(KEY STRING, VALUE STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.TestSerDe' STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/input39_hadoop20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/input39_hadoop20.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/input39_hadoop20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/input39_hadoop20.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,12 @@
-PREHOOK: query: create table t1(key string, value string) partitioned by (ds string)
+PREHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+
+create table t1(key string, value string) partitioned by (ds string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table t1(key string, value string) partitioned by (ds string)
+POSTHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+
+create table t1(key string, value string) partitioned by (ds string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@t1
 PREHOOK: query: create table t2(key string, value string) partitioned by (ds string)

Modified: hive/trunk/ql/src/test/results/clientpositive/input_part10.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/input_part10.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/input_part10.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/input_part10.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,7 @@
-PREHOOK: query: CREATE TABLE part_special (
+PREHOOK: query: -- EXCLUDE_OS_WINDOWS
+-- excluded on windows because of difference in file name encoding logic
+
+CREATE TABLE part_special (
   a STRING,
   b STRING
 ) PARTITIONED BY (
@@ -6,7 +9,10 @@ PREHOOK: query: CREATE TABLE part_specia
   ts STRING
 )
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part_special (
+POSTHOOK: query: -- EXCLUDE_OS_WINDOWS
+-- excluded on windows because of difference in file name encoding logic
+
+CREATE TABLE part_special (
   a STRING,
   b STRING
 ) PARTITIONED BY (

Modified: hive/trunk/ql/src/test/results/clientpositive/inputddl4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/inputddl4.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/inputddl4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/inputddl4.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,6 @@
-PREHOOK: query: CREATE TABLE INPUTDDL4(viewTime STRING, userid INT,
+PREHOOK: query: -- a simple test to test sorted/clustered syntax
+
+CREATE TABLE INPUTDDL4(viewTime STRING, userid INT,
                        page_url STRING, referrer_url STRING, 
                        friends ARRAY<BIGINT>, properties MAP<STRING, STRING>,
                        ip STRING COMMENT 'IP Address of the User') 
@@ -6,7 +8,9 @@ PREHOOK: query: CREATE TABLE INPUTDDL4(v
     PARTITIONED BY(ds STRING, country STRING) 
     CLUSTERED BY(userid) SORTED BY(viewTime) INTO 32 BUCKETS
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE INPUTDDL4(viewTime STRING, userid INT,
+POSTHOOK: query: -- a simple test to test sorted/clustered syntax
+
+CREATE TABLE INPUTDDL4(viewTime STRING, userid INT,
                        page_url STRING, referrer_url STRING, 
                        friends ARRAY<BIGINT>, properties MAP<STRING, STRING>,
                        ip STRING COMMENT 'IP Address of the User') 

Modified: hive/trunk/ql/src/test/results/clientpositive/inputddl5.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/inputddl5.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/inputddl5.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/inputddl5.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: CREATE TABLE INPUTDDL5(name STRING) STORED AS TEXTFILE
+PREHOOK: query: -- test for internationalization
+-- kv4.txt contains the utf-8 character 0xE982B5E993AE which we are verifying later on
+CREATE TABLE INPUTDDL5(name STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE INPUTDDL5(name STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- test for internationalization
+-- kv4.txt contains the utf-8 character 0xE982B5E993AE which we are verifying later on
+CREATE TABLE INPUTDDL5(name STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@INPUTDDL5
 PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv4.txt' INTO TABLE INPUTDDL5

Modified: hive/trunk/ql/src/test/results/clientpositive/inputddl6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/inputddl6.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/inputddl6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/inputddl6.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,12 @@
-PREHOOK: query: CREATE TABLE INPUTDDL6(KEY STRING, VALUE STRING) PARTITIONED BY(ds STRING) STORED AS TEXTFILE
+PREHOOK: query: -- test for describe extended table
+-- test for describe extended table partition
+-- test for alter table drop partition
+CREATE TABLE INPUTDDL6(KEY STRING, VALUE STRING) PARTITIONED BY(ds STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE INPUTDDL6(KEY STRING, VALUE STRING) PARTITIONED BY(ds STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- test for describe extended table
+-- test for describe extended table partition
+-- test for alter table drop partition
+CREATE TABLE INPUTDDL6(KEY STRING, VALUE STRING) PARTITIONED BY(ds STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@INPUTDDL6
 PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt' INTO TABLE INPUTDDL6 PARTITION (ds='2008-04-09')

Modified: hive/trunk/ql/src/test/results/clientpositive/inputddl7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/inputddl7.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/inputddl7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/inputddl7.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,14 @@
-PREHOOK: query: CREATE TABLE T1(name STRING) STORED AS TEXTFILE
+PREHOOK: query: -- test for loading into tables with the correct file format
+-- test for loading into partitions with the correct file format
+
+
+CREATE TABLE T1(name STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE T1(name STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- test for loading into tables with the correct file format
+-- test for loading into partitions with the correct file format
+
+
+CREATE TABLE T1(name STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@T1
 PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/kv1.txt' INTO TABLE T1

Modified: hive/trunk/ql/src/test/results/clientpositive/insert1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/insert1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/insert1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/insert1.q.out Wed Apr 10 00:06:55 2013
@@ -220,9 +220,11 @@ STAGE PLANS:
 #### A masked pattern was here ####
 
 
-PREHOOK: query: create database x
+PREHOOK: query: -- HIVE-3465
+create database x
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: create database x
+POSTHOOK: query: -- HIVE-3465
+create database x
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Lineage: insert1.key SIMPLE [(insert2)a.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: insert1.value SIMPLE [(insert2)a.FieldSchema(name:value, type:string, comment:null), ]
@@ -622,9 +624,11 @@ STAGE PLANS:
 #### A masked pattern was here ####
 
 
-PREHOOK: query: CREATE DATABASE db2
+PREHOOK: query: -- HIVE-3676
+CREATE DATABASE db2
 PREHOOK: type: CREATEDATABASE
-POSTHOOK: query: CREATE DATABASE db2
+POSTHOOK: query: -- HIVE-3676
+CREATE DATABASE db2
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Lineage: insert1.key SIMPLE [(insert2)a.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: insert1.value SIMPLE [(insert2)a.FieldSchema(name:value, type:string, comment:null), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/join14_hadoop20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join14_hadoop20.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join14_hadoop20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join14_hadoop20.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: CREATE TABLE dest1(c1 INT, c2 STRING) STORED AS TEXTFILE
+PREHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+CREATE TABLE dest1(c1 INT, c2 STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE dest1(c1 INT, c2 STRING) STORED AS TEXTFILE
+POSTHOOK: query: -- INCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S)
+
+CREATE TABLE dest1(c1 INT, c2 STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest1
 PREHOOK: query: EXPLAIN

Modified: hive/trunk/ql/src/test/results/clientpositive/join28.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join28.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join28.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join28.q.out Wed Apr 10 00:06:55 2013
@@ -3,7 +3,9 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq.key1, z.value
 FROM
@@ -11,7 +13,9 @@ FROM
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq.key1, z.value
 FROM

Modified: hive/trunk/ql/src/test/results/clientpositive/join29.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join29.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join29.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join29.q.out Wed Apr 10 00:06:55 2013
@@ -3,13 +3,17 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, cnt1 INT, cnt2 INT)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq1.key, subq1.cnt, subq2.cnt
 FROM (select x.key, count(1) as cnt from src1 x group by x.key) subq1 JOIN 
      (select y.key, count(1) as cnt from src y group by y.key) subq2 ON (subq1.key = subq2.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq1.key, subq1.cnt, subq2.cnt
 FROM (select x.key, count(1) as cnt from src1 x group by x.key) subq1 JOIN 

Modified: hive/trunk/ql/src/test/results/clientpositive/join31.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join31.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join31.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join31.q.out Wed Apr 10 00:06:55 2013
@@ -3,14 +3,18 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, cnt INT)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN 
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN 
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq1.key, count(1) as cnt
 FROM (select x.key, count(1) as cnt from src1 x group by x.key) subq1 JOIN 
      (select y.key, count(1) as cnt from src y group by y.key) subq2 ON (subq1.key = subq2.key)
 group by subq1.key
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN 
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN 
 INSERT OVERWRITE TABLE dest_j1 
 SELECT subq1.key, count(1) as cnt
 FROM (select x.key, count(1) as cnt from src1 x group by x.key) subq1 JOIN 

Modified: hive/trunk/ql/src/test/results/clientpositive/join32.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join32.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join32.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join32.q.out Wed Apr 10 00:06:55 2013
@@ -3,13 +3,17 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN EXTENDED
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, z.value, y.value
 FROM src1 x JOIN src y ON (x.key = y.key) 
 JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN EXTENDED
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, z.value, y.value
 FROM src1 x JOIN src y ON (x.key = y.key) 

Modified: hive/trunk/ql/src/test/results/clientpositive/join33.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join33.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join33.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join33.q.out Wed Apr 10 00:06:55 2013
@@ -3,13 +3,17 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN EXTENDED
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, z.value, y.value
 FROM src1 x JOIN src y ON (x.key = y.key) 
 JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN EXTENDED
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, z.value, y.value
 FROM src1 x JOIN src y ON (x.key = y.key) 

Modified: hive/trunk/ql/src/test/results/clientpositive/join34.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join34.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join34.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join34.q.out Wed Apr 10 00:06:55 2013
@@ -3,7 +3,9 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN EXTENDED
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, x.value, subq1.value
 FROM 
@@ -13,7 +15,9 @@ FROM 
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN EXTENDED
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, x.value, subq1.value
 FROM 

Modified: hive/trunk/ql/src/test/results/clientpositive/join35.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join35.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join35.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join35.q.out Wed Apr 10 00:06:55 2013
@@ -3,7 +3,9 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 INT) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest_j1
-PREHOOK: query: EXPLAIN EXTENDED
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, x.value, subq1.cnt
 FROM 
@@ -13,7 +15,9 @@ FROM 
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN EXTENDED
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE dest_j1
 SELECT x.key, x.value, subq1.cnt
 FROM 

Modified: hive/trunk/ql/src/test/results/clientpositive/join41.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join41.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join41.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join41.q.out Wed Apr 10 00:06:55 2013
@@ -103,10 +103,12 @@ POSTHOOK: Input: default@s1
 0	val_0	NULL	NULL
 0	val_0	NULL	NULL
 0	val_0	NULL	NULL
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- Make sure the big table is chosen correctly as part of HIVE-4146
+EXPLAIN
 SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- Make sure the big table is chosen correctly as part of HIVE-4146
+EXPLAIN
 SELECT * FROM s1 src1 LEFT OUTER JOIN s1 src2 ON (src1.key = src2.key AND src2.key > 10)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:

Modified: hive/trunk/ql/src/test/results/clientpositive/join_filters_overlap.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_filters_overlap.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_filters_overlap.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_filters_overlap.q.out Wed Apr 10 00:06:55 2013
@@ -1,13 +1,19 @@
-PREHOOK: query: create table a as SELECT 100 as key, a.value as value FROM src LATERAL VIEW explode(array(40, 50, 60)) a as value limit 3
+PREHOOK: query: -- HIVE-3411 Filter predicates on outer join overlapped on single alias is not handled properly
+
+create table a as SELECT 100 as key, a.value as value FROM src LATERAL VIEW explode(array(40, 50, 60)) a as value limit 3
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: create table a as SELECT 100 as key, a.value as value FROM src LATERAL VIEW explode(array(40, 50, 60)) a as value limit 3
+POSTHOOK: query: -- HIVE-3411 Filter predicates on outer join overlapped on single alias is not handled properly
+
+create table a as SELECT 100 as key, a.value as value FROM src LATERAL VIEW explode(array(40, 50, 60)) a as value limit 3
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@a
-PREHOOK: query: explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60)
+PREHOOK: query: -- overlap on a
+explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60)
+POSTHOOK: query: -- overlap on a
+explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME a)) (TOK_TABREF (TOK_TABNAME a) b) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) value) 50)) (= (. (TOK_TABLE_OR_COL b) value) 50))) (TOK_TABREF (TOK_TABNAME a) c) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL c) key)) (= (. (TOK_TABLE_OR_COL a) value) 60)) (= (. (TOK_TABLE_OR_COL c) value) 60)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -209,9 +215,11 @@ POSTHOOK: Input: default@a
 100	40	NULL	NULL	NULL	NULL
 100	50	100	50	NULL	NULL
 100	60	NULL	NULL	100	60
-PREHOOK: query: explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60)
+PREHOOK: query: -- overlap on b
+explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60)
+POSTHOOK: query: -- overlap on b
+explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME a)) (TOK_TABREF (TOK_TABNAME a) b) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) value) 50)) (= (. (TOK_TABLE_OR_COL b) value) 50))) (TOK_TABREF (TOK_TABNAME a) c) (AND (AND (= (. (TOK_TABLE_OR_COL b) key) (. (TOK_TABLE_OR_COL c) key)) (= (. (TOK_TABLE_OR_COL b) value) 60)) (= (. (TOK_TABLE_OR_COL c) value) 60)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -413,9 +421,11 @@ POSTHOOK: Input: default@a
 NULL	NULL	100	40	NULL	NULL
 100	50	100	50	NULL	NULL
 NULL	NULL	100	60	100	60
-PREHOOK: query: explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50 AND b.value>10) left outer join a c on (b.key=c.key AND b.value=60 AND b.value>20 AND c.value=60)
+PREHOOK: query: -- overlap on b with two filters for each
+explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50 AND b.value>10) left outer join a c on (b.key=c.key AND b.value=60 AND b.value>20 AND c.value=60)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50 AND b.value>10) left outer join a c on (b.key=c.key AND b.value=60 AND b.value>20 AND c.value=60)
+POSTHOOK: query: -- overlap on b with two filters for each
+explain extended select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50 AND b.value>10) left outer join a c on (b.key=c.key AND b.value=60 AND b.value>20 AND c.value=60)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME a)) (TOK_TABREF (TOK_TABNAME a) b) (AND (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) value) 50)) (= (. (TOK_TABLE_OR_COL b) value) 50)) (> (. (TOK_TABLE_OR_COL b) value) 10))) (TOK_TABREF (TOK_TABNAME a) c) (AND (AND (AND (= (. (TOK_TABLE_OR_COL b) key) (. (TOK_TABLE_OR_COL c) key)) (= (. (TOK_TABLE_OR_COL b) value) 60)) (> (. (TOK_TABLE_OR_COL b) value) 20)) (= (. (TOK_TABLE_OR_COL c) value) 60)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -617,9 +627,11 @@ POSTHOOK: Input: default@a
 NULL	NULL	100	40	NULL	NULL
 100	50	100	50	NULL	NULL
 NULL	NULL	100	60	100	60
-PREHOOK: query: explain extended select * from a full outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
+PREHOOK: query: -- overlap on a, b
+explain extended select * from a full outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select * from a full outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
+POSTHOOK: query: -- overlap on a, b
+explain extended select * from a full outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_FULLOUTERJOIN (TOK_TABREF (TOK_TABNAME a)) (TOK_TABREF (TOK_TABNAME a) b) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) value) 50)) (= (. (TOK_TABLE_OR_COL b) value) 50))) (TOK_TABREF (TOK_TABNAME a) c) (AND (AND (= (. (TOK_TABLE_OR_COL b) key) (. (TOK_TABLE_OR_COL c) key)) (= (. (TOK_TABLE_OR_COL b) value) 60)) (= (. (TOK_TABLE_OR_COL c) value) 60))) (TOK_TABREF (TOK_TABNAME a) d) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL a) value) 40)) (= (. (TOK_TABLE_OR_COL d) value) 40)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -838,9 +850,11 @@ NULL	NULL	100	40	NULL	NULL	NULL	NULL
 NULL	NULL	100	60	100	60	NULL	NULL
 100	50	100	50	NULL	NULL	NULL	NULL
 100	60	NULL	NULL	NULL	NULL	NULL	NULL
-PREHOOK: query: explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
+PREHOOK: query: -- triple overlap on a
+explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
+POSTHOOK: query: -- triple overlap on a
+explain extended select * from a left outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (a.key=c.key AND a.value=60 AND c.value=60) left outer join a d on (a.key=d.key AND a.value=40 AND d.value=40)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME a)) (TOK_TABREF (TOK_TABNAME a) b) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) value) 50)) (= (. (TOK_TABLE_OR_COL b) value) 50))) (TOK_TABREF (TOK_TABNAME a) c) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL c) key)) (= (. (TOK_TABLE_OR_COL a) value) 60)) (= (. (TOK_TABLE_OR_COL c) value) 60))) (TOK_TABREF (TOK_TABNAME a) d) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL a) value) 40)) (= (. (TOK_TABLE_OR_COL d) value) 40)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))

Modified: hive/trunk/ql/src/test/results/clientpositive/join_nullsafe.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_nullsafe.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_nullsafe.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_nullsafe.q.out Wed Apr 10 00:06:55 2013
@@ -9,9 +9,11 @@ PREHOOK: Output: default@myinput1
 POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/in8.txt' INTO TABLE myinput1
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@myinput1
-PREHOOK: query: explain select * from myinput1 a join myinput1 b on a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+PREHOOK: query: -- merging
+explain select * from myinput1 a join myinput1 b on a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select * from myinput1 a join myinput1 b on a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+POSTHOOK: query: -- merging
+explain select * from myinput1 a join myinput1 b on a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME myinput1) a) (TOK_TABREF (TOK_TABNAME myinput1) b) (<=> (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) value)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) value)))))
@@ -829,11 +831,13 @@ NULL	NULL	NULL	NULL	NULL	NULL
 NULL	10	10	NULL	NULL	10
 10	NULL	NULL	10	10	NULL
 100	100	100	100	100	100
-PREHOOK: query: SELECT * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+PREHOOK: query: -- outer joins
+SELECT * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@myinput1
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+POSTHOOK: query: -- outer joins
+SELECT * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@myinput1
 #### A masked pattern was here ####
@@ -890,11 +894,13 @@ NULL	35	48	NULL
 10	NULL	NULL	10
 48	NULL	NULL	NULL
 100	100	100	100
-PREHOOK: query: SELECT /*+ MAPJOIN(a) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+PREHOOK: query: -- map joins
+SELECT /*+ MAPJOIN(a) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@myinput1
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT /*+ MAPJOIN(a) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
+POSTHOOK: query: -- map joins
+SELECT /*+ MAPJOIN(a) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value ORDER BY a.key, a.value, b.key, b.value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@myinput1
 #### A masked pattern was here ####
@@ -928,9 +934,11 @@ NULL	35	10	NULL
 NULL	35	48	NULL
 10	NULL	NULL	10
 100	100	100	100
-PREHOOK: query: CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
+PREHOOK: query: -- smbs
+CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
+POSTHOOK: query: -- smbs
+CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@smb_input1
 PREHOOK: query: CREATE TABLE smb_input2(key int, value int) CLUSTERED BY (value) SORTED BY (value) INTO 2 BUCKETS

Modified: hive/trunk/ql/src/test/results/clientpositive/join_vc.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_vc.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_vc.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_vc.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: explain select t3.BLOCK__OFFSET__INSIDE__FILE,t3.key,t3.value from src t1 join src t2 on t1.key = t2.key join src t3 on t2.value = t3.value order by t3.value limit 3
+PREHOOK: query: -- see HIVE-4033 earlier a flag named hasVC was not initialized correctly in MapOperator.java, resulting in NPE for following query. order by and limit in the query is not relevant, problem would be evident even without those. They are there to keep .q.out file small and sorted.
+
+explain select t3.BLOCK__OFFSET__INSIDE__FILE,t3.key,t3.value from src t1 join src t2 on t1.key = t2.key join src t3 on t2.value = t3.value order by t3.value limit 3
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select t3.BLOCK__OFFSET__INSIDE__FILE,t3.key,t3.value from src t1 join src t2 on t1.key = t2.key join src t3 on t2.value = t3.value order by t3.value limit 3
+POSTHOOK: query: -- see HIVE-4033 earlier a flag named hasVC was not initialized correctly in MapOperator.java, resulting in NPE for following query. order by and limit in the query is not relevant, problem would be evident even without those. They are there to keep .q.out file small and sorted.
+
+explain select t3.BLOCK__OFFSET__INSIDE__FILE,t3.key,t3.value from src t1 join src t2 on t1.key = t2.key join src t3 on t2.value = t3.value order by t3.value limit 3
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) t1) (TOK_TABREF (TOK_TABNAME src) t2) (= (. (TOK_TABLE_OR_COL t1) key) (. (TOK_TABLE_OR_COL t2) key))) (TOK_TABREF (TOK_TABNAME src) t3) (= (. (TOK_TABLE_OR_COL t2) value) (. (TOK_TABLE_OR_COL t3) value)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL t3) BLOCK__OFFSET__INSIDE__FILE)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL t3) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL t3) value))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL t3) value))) (TOK_LIMIT 3)))

Modified: hive/trunk/ql/src/test/results/clientpositive/join_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join_view.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join_view.q.out Wed Apr 10 00:06:55 2013
@@ -16,9 +16,13 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: create table invites2 (foo int, bar string) partitioned by (ds string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@invites2
-PREHOOK: query: create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
+PREHOOK: query: -- test join views: see HIVE-1989
+
+create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
 PREHOOK: type: CREATEVIEW
-POSTHOOK: query: create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
+POSTHOOK: query: -- test join views: see HIVE-1989
+
+create view v as select invites.bar, invites2.foo, invites2.ds from invites join invites2 on invites.ds=invites2.ds
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Output: default@v
 PREHOOK: query: explain select * from v where ds='2011-09-01'

Modified: hive/trunk/ql/src/test/results/clientpositive/keyword_1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/keyword_1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/keyword_1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/keyword_1.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: create table test_user (user string, `group` string)
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table test_user (user string, `group` string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table test_user (user string, `group` string)
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table test_user (user string, `group` string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@test_user
 PREHOOK: query: grant select on table test_user to user hive_test

Modified: hive/trunk/ql/src/test/results/clientpositive/lateral_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/lateral_view.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/lateral_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/lateral_view.q.out Wed Apr 10 00:06:55 2013
@@ -440,21 +440,25 @@ STAGE PLANS:
       limit: 3
 
 
-PREHOOK: query: SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
+PREHOOK: query: -- Verify that * selects columns from both tables
+SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
+POSTHOOK: query: -- Verify that * selects columns from both tables
+SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 0	val_0	1
-PREHOOK: query: SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
+PREHOOK: query: -- TABLE.* should be supported
+SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
+POSTHOOK: query: -- TABLE.* should be supported
+SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -462,11 +466,13 @@ POSTHOOK: Lineage: tmp_pyang_lv.inputs S
 1
 2
 3
-PREHOOK: query: SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9
+PREHOOK: query: -- Multiple lateral views should result in a Cartesian product
+SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9
+POSTHOOK: query: -- Multiple lateral views should result in a Cartesian product
+SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -480,11 +486,13 @@ POSTHOOK: Lineage: tmp_pyang_lv.inputs S
 3	a
 3	b
 3	c
-PREHOOK: query: SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
+PREHOOK: query: -- Should be able to reference tables generated earlier
+SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
+POSTHOOK: query: -- Should be able to reference tables generated earlier
+SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/lateral_view_cp.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/lateral_view_cp.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/lateral_view_cp.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/lateral_view_cp.q.out Wed Apr 10 00:06:55 2013
@@ -19,9 +19,11 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@array_valued_src
 POSTHOOK: Lineage: array_valued_src.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: array_valued_src.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain select count(val) from (select a.key as key, b.value as array_val from src a join array_valued_src b on a.key=b.key) i lateral view explode (array_val) c as val
+PREHOOK: query: -- replace sel(*) to sel(exprs) for reflecting CP result properly
+explain select count(val) from (select a.key as key, b.value as array_val from src a join array_valued_src b on a.key=b.key) i lateral view explode (array_val) c as val
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select count(val) from (select a.key as key, b.value as array_val from src a join array_valued_src b on a.key=b.key) i lateral view explode (array_val) c as val
+POSTHOOK: query: -- replace sel(*) to sel(exprs) for reflecting CP result properly
+explain select count(val) from (select a.key as key, b.value as array_val from src a join array_valued_src b on a.key=b.key) i lateral view explode (array_val) c as val
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: array_valued_src.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: array_valued_src.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/leadlag.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/leadlag.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/leadlag.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/leadlag.q.out Wed Apr 10 00:06:55 2013
@@ -2,7 +2,8 @@ PREHOOK: query: DROP TABLE part
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE part
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE TABLE part( 
+PREHOOK: query: -- data setup
+CREATE TABLE part( 
     p_partkey INT,
     p_name STRING,
     p_mfgr STRING,
@@ -14,7 +15,8 @@ PREHOOK: query: CREATE TABLE part( 
     p_comment STRING
 )
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part( 
+POSTHOOK: query: -- data setup
+CREATE TABLE part( 
     p_partkey INT,
     p_name STRING,
     p_mfgr STRING,
@@ -85,7 +87,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	3	3	1788.73	5190.08	2	-4
 Manufacturer#5	almond aquamarine dodger light gainsboro	4	4	1018.1	6208.18	46	44
 Manufacturer#5	almond azure blanched chiffon midnight	5	5	1464.48	7672.66	23	-23
-PREHOOK: query: select p_mfgr, p_name,
+PREHOOK: query: -- 2. testLagWithWindowingNoPTF
+select p_mfgr, p_name,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
 p_retailprice, sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1,
@@ -94,7 +97,8 @@ from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_name,
+POSTHOOK: query: -- 2. testLagWithWindowingNoPTF
+select p_mfgr, p_name,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
 p_retailprice, sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1,
@@ -129,13 +133,15 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	3	3	1788.73	5190.08	2	-4
 Manufacturer#5	almond aquamarine dodger light gainsboro	4	4	1018.1	6208.18	46	44
 Manufacturer#5	almond azure blanched chiffon midnight	5	5	1464.48	7672.66	23	-23
-PREHOOK: query: select p1.p_mfgr, p1.p_name,
+PREHOOK: query: -- 3. testJoinWithLag
+select p1.p_mfgr, p1.p_name,
 p1.p_size, p1.p_size - lag(p1.p_size,1,p1.p_size) over( distribute by p1.p_mfgr sort by p1.p_name) as deltaSz
 from part p1 join part p2 on p1.p_partkey = p2.p_partkey
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p1.p_mfgr, p1.p_name,
+POSTHOOK: query: -- 3. testJoinWithLag
+select p1.p_mfgr, p1.p_name,
 p1.p_size, p1.p_size - lag(p1.p_size,1,p1.p_size) over( distribute by p1.p_mfgr sort by p1.p_name) as deltaSz
 from part p1 join part p2 on p1.p_partkey = p2.p_partkey
 POSTHOOK: type: QUERY
@@ -169,14 +175,16 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	2	-4
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	44
 Manufacturer#5	almond azure blanched chiffon midnight	23	-23
-PREHOOK: query: select  p_mfgr,p_name, p_size,   
+PREHOOK: query: -- 4. testLagInSum
+select  p_mfgr,p_name, p_size,   
 sum(p_size - lag(p_size,1)) over(distribute by p_mfgr  sort by p_mfgr ) as deltaSum 
 from part 
 window w1 as (rows between 2 preceding and 2 following)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select  p_mfgr,p_name, p_size,   
+POSTHOOK: query: -- 4. testLagInSum
+select  p_mfgr,p_name, p_size,   
 sum(p_size - lag(p_size,1)) over(distribute by p_mfgr  sort by p_mfgr ) as deltaSum 
 from part 
 window w1 as (rows between 2 preceding and 2 following)
@@ -209,14 +217,16 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	2	-8
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	-8
 Manufacturer#5	almond azure blanched chiffon midnight	23	-8
-PREHOOK: query: select  p_mfgr,p_name, p_size,   
+PREHOOK: query: -- 5. testLagInSumOverWindow
+select  p_mfgr,p_name, p_size,   
 sum(p_size - lag(p_size,1)) over w1 as deltaSum 
 from part 
 window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select  p_mfgr,p_name, p_size,   
+POSTHOOK: query: -- 5. testLagInSumOverWindow
+select  p_mfgr,p_name, p_size,   
 sum(p_size - lag(p_size,1)) over w1 as deltaSum 
 from part 
 window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following)
@@ -249,7 +259,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	2	-8
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	17
 Manufacturer#5	almond azure blanched chiffon midnight	23	21
-PREHOOK: query: select p_mfgr, p_name, p_size, r1,
+PREHOOK: query: -- 6. testRankInLead
+select p_mfgr, p_name, p_size, r1,
 lead(r1,1,r1) over (distribute by p_mfgr sort by p_name) as deltaRank
 from (
 select p_mfgr, p_name, p_size, 
@@ -259,7 +270,8 @@ from part 
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_name, p_size, r1,
+POSTHOOK: query: -- 6. testRankInLead
+select p_mfgr, p_name, p_size, r1,
 lead(r1,1,r1) over (distribute by p_mfgr sort by p_name) as deltaRank
 from (
 select p_mfgr, p_name, p_size, 
@@ -295,7 +307,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	2	3	4
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	4	5
 Manufacturer#5	almond azure blanched chiffon midnight	23	5	5
-PREHOOK: query: select p_mfgr, p_name, 
+PREHOOK: query: -- 7. testLeadWithPTF
+select p_mfgr, p_name, 
 rank() over(distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over(distribute by p_mfgr sort by p_name) as dr, 
 p_size, p_size - lead(p_size,1,p_size) over(distribute by p_mfgr sort by p_name) as deltaSz 
@@ -306,7 +319,8 @@ order by p_name  
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_name, 
+POSTHOOK: query: -- 7. testLeadWithPTF
+select p_mfgr, p_name, 
 rank() over(distribute by p_mfgr sort by p_name) as r, 
 dense_rank() over(distribute by p_mfgr sort by p_name) as dr, 
 p_size, p_size - lead(p_size,1,p_size) over(distribute by p_mfgr sort by p_name) as deltaSz 
@@ -343,7 +357,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	3	3	2	-44
 Manufacturer#5	almond aquamarine dodger light gainsboro	4	4	46	23
 Manufacturer#5	almond azure blanched chiffon midnight	5	5	23	0
-PREHOOK: query: select p_name, p_retailprice,
+PREHOOK: query: -- 8. testOverNoPartitionMultipleAggregate
+select p_name, p_retailprice,
 lead(p_retailprice) over() as l1 ,
 lag(p_retailprice)  over() as l2
 from part
@@ -351,7 +366,8 @@ order by p_name
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_name, p_retailprice,
+POSTHOOK: query: -- 8. testOverNoPartitionMultipleAggregate
+select p_name, p_retailprice,
 lead(p_retailprice) over() as l1 ,
 lag(p_retailprice)  over() as l2
 from part

Modified: hive/trunk/ql/src/test/results/clientpositive/leadlag_queries.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/leadlag_queries.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/leadlag_queries.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/leadlag_queries.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,5 @@
-PREHOOK: query: CREATE TABLE part( 
+PREHOOK: query: -- data setup
+CREATE TABLE part( 
     p_partkey INT,
     p_name STRING,
     p_mfgr STRING,
@@ -10,7 +11,8 @@ PREHOOK: query: CREATE TABLE part( 
     p_comment STRING
 )
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE part( 
+POSTHOOK: query: -- data setup
+CREATE TABLE part( 
     p_partkey INT,
     p_name STRING,
     p_mfgr STRING,
@@ -29,7 +31,8 @@ PREHOOK: Output: default@part
 POSTHOOK: query: LOAD DATA LOCAL INPATH '../data/files/part_tiny.txt' overwrite into table part
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@part
-PREHOOK: query: select p_mfgr, p_retailprice,
+PREHOOK: query: -- 1. testLeadUDAF
+select p_mfgr, p_retailprice,
 lead(p_retailprice) over (partition by p_mfgr order by p_name) as l1,
 lead(p_retailprice,1) over (partition by p_mfgr order by p_name) as l2,
 lead(p_retailprice,1,10) over (partition by p_mfgr order by p_name) as l3,
@@ -39,7 +42,8 @@ from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_retailprice,
+POSTHOOK: query: -- 1. testLeadUDAF
+select p_mfgr, p_retailprice,
 lead(p_retailprice) over (partition by p_mfgr order by p_name) as l1,
 lead(p_retailprice,1) over (partition by p_mfgr order by p_name) as l2,
 lead(p_retailprice,1,10) over (partition by p_mfgr order by p_name) as l3,
@@ -75,14 +79,16 @@ Manufacturer#5	1611.66	1788.73	1788.73	1
 Manufacturer#5	1788.73	1018.1	1018.1	1018.1	1018.1	770.63
 Manufacturer#5	1018.1	1464.48	1464.48	1464.48	1464.48	-446.38
 Manufacturer#5	1464.48	NULL	NULL	10.0	1464.48	0.0
-PREHOOK: query: select p_mfgr, p_name, p_retailprice,
+PREHOOK: query: -- 2.testLeadUDAFPartSz1
+select p_mfgr, p_name, p_retailprice,
 lead(p_retailprice,1) over (partition by p_mfgr, p_name ),
 p_retailprice - lead(p_retailprice,1,p_retailprice) over (partition by p_mfgr, p_name)
 from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_name, p_retailprice,
+POSTHOOK: query: -- 2.testLeadUDAFPartSz1
+select p_mfgr, p_name, p_retailprice,
 lead(p_retailprice,1) over (partition by p_mfgr, p_name ),
 p_retailprice - lead(p_retailprice,1,p_retailprice) over (partition by p_mfgr, p_name)
 from part
@@ -115,7 +121,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	1788.73	NULL	0.0
 Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	NULL	0.0
 Manufacturer#5	almond azure blanched chiffon midnight	1464.48	NULL	0.0
-PREHOOK: query: select p_mfgr, p_retailprice,
+PREHOOK: query: -- 3.testLagUDAF
+select p_mfgr, p_retailprice,
 lag(p_retailprice,1) over (partition by p_mfgr order by p_name) as l1,
 lag(p_retailprice) over (partition by p_mfgr order by p_name) as l2,
 lag(p_retailprice,1, p_retailprice) over (partition by p_mfgr order by p_name) as l3,
@@ -125,7 +132,8 @@ from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_retailprice,
+POSTHOOK: query: -- 3.testLagUDAF
+select p_mfgr, p_retailprice,
 lag(p_retailprice,1) over (partition by p_mfgr order by p_name) as l1,
 lag(p_retailprice) over (partition by p_mfgr order by p_name) as l2,
 lag(p_retailprice,1, p_retailprice) over (partition by p_mfgr order by p_name) as l3,
@@ -161,14 +169,16 @@ Manufacturer#5	1611.66	1789.69	1789.69	1
 Manufacturer#5	1788.73	1611.66	1611.66	1611.66	1611.66	177.06999999999994
 Manufacturer#5	1018.1	1788.73	1788.73	1788.73	1788.73	-770.63
 Manufacturer#5	1464.48	1018.1	1018.1	1018.1	1018.1	446.38
-PREHOOK: query: select p_mfgr, p_name, p_retailprice,
+PREHOOK: query: -- 4.testLagUDAFPartSz1
+select p_mfgr, p_name, p_retailprice,
 lag(p_retailprice,1) over (partition by p_mfgr, p_name ),
 p_retailprice - lag(p_retailprice,1,p_retailprice) over (partition by p_mfgr, p_name)
 from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_name, p_retailprice,
+POSTHOOK: query: -- 4.testLagUDAFPartSz1
+select p_mfgr, p_name, p_retailprice,
 lag(p_retailprice,1) over (partition by p_mfgr, p_name ),
 p_retailprice - lag(p_retailprice,1,p_retailprice) over (partition by p_mfgr, p_name)
 from part
@@ -201,7 +211,8 @@ Manufacturer#5	almond antique medium spr
 Manufacturer#5	almond antique sky peru orange	1788.73	NULL	0.0
 Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	NULL	0.0
 Manufacturer#5	almond azure blanched chiffon midnight	1464.48	NULL	0.0
-PREHOOK: query: select p_mfgr, p_retailprice,
+PREHOOK: query: -- 5.testLeadLagUDAF
+select p_mfgr, p_retailprice,
 lead(p_retailprice,1) over (partition by p_mfgr order by p_name) as l1,
 lead(p_retailprice,1, p_retailprice) over (partition by p_mfgr order by p_name) as l2,
 p_retailprice - lead(p_retailprice,1,p_retailprice) over (partition by p_mfgr order by p_name),
@@ -211,7 +222,8 @@ from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-POSTHOOK: query: select p_mfgr, p_retailprice,
+POSTHOOK: query: -- 5.testLeadLagUDAF
+select p_mfgr, p_retailprice,
 lead(p_retailprice,1) over (partition by p_mfgr order by p_name) as l1,
 lead(p_retailprice,1, p_retailprice) over (partition by p_mfgr order by p_name) as l2,
 p_retailprice - lead(p_retailprice,1,p_retailprice) over (partition by p_mfgr order by p_name),

Modified: hive/trunk/ql/src/test/results/clientpositive/load_dyn_part14.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/load_dyn_part14.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/load_dyn_part14.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/load_dyn_part14.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,13 @@
-PREHOOK: query: create table if not exists nzhang_part14 (key string) 
+PREHOOK: query: -- EXCLUDE_OS_WINDOWS
+-- excluded on windows because of difference in file name encoding logic
+
+create table if not exists nzhang_part14 (key string) 
   partitioned by (value string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table if not exists nzhang_part14 (key string) 
+POSTHOOK: query: -- EXCLUDE_OS_WINDOWS
+-- excluded on windows because of difference in file name encoding logic
+
+create table if not exists nzhang_part14 (key string) 
   partitioned by (value string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@nzhang_part14

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin1.q.out Wed Apr 10 00:06:55 2013
@@ -21,10 +21,12 @@ POSTHOOK: Input: default@srcpart@ds=2008
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
 1114788.0
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- const filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN src b on a.key=b.key AND true limit 10
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- const filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN src b on a.key=b.key AND true limit 10
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
@@ -124,10 +126,12 @@ POSTHOOK: Input: default@src
 165	val_165	165	val_165
 165	val_165	165	val_165
 409	val_409	409	val_409
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- func filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN src b on a.key=b.key AND b.key * 10 < '1000' limit 10
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- func filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN src b on a.key=b.key AND b.key * 10 < '1000' limit 10
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
@@ -227,11 +231,13 @@ NULL	NULL	255	val_255
 NULL	NULL	278	val_278
 98	val_98	98	val_98
 98	val_98	98	val_98
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- field filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN
     (select key, named_struct('key', key, 'value', value) as kv from src) b on a.key=b.key AND b.kv.key > 200 limit 10
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- field filter on outer join
+EXPLAIN
 SELECT /*+ MAPJOIN(a) */ * FROM src a RIGHT OUTER JOIN
     (select key, named_struct('key', key, 'value', value) as kv from src) b on a.key=b.key AND b.kv.key > 200 limit 10
 POSTHOOK: type: QUERY

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart)) (TOK_TABREF (TOK_TABNAME src)) (= (. (TOK_TABLE_OR_COL srcpart) value) (. (TOK_TABLE_OR_COL src) value))) (TOK_TABREF (TOK_TABNAME src1)) (= (. (TOK_TABLE_OR_COL srcpart) key) (. (TOK_TABLE_OR_COL src1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) key)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out Wed Apr 10 00:06:55 2013
@@ -1,11 +1,15 @@
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 SELECT subq.key1, z.value
 FROM
 (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 SELECT subq.key1, z.value
 FROM
 (SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out Wed Apr 10 00:06:55 2013
@@ -49,14 +49,18 @@ PREHOOK: Output: default@z
 POSTHOOK: query: load data local inpath '../data/files/z.txt' INTO TABLE z
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@z
-PREHOOK: query: EXPLAIN
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
 (SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 
  FROM y JOIN x ON (x.id = y.id)) subq
  JOIN z ON (subq.key1 = z.id)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
 SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
 (SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 



Mime
View raw message