hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1466300 [2/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/ambiguous_col.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ambiguous_col.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ambiguous_col.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ambiguous_col.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: explain select * from (select a.key, a.* from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+PREHOOK: query: -- TOK_ALLCOLREF
+explain select * from (select a.key, a.* from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select * from (select a.key, a.* from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+POSTHOOK: query: -- TOK_ALLCOLREF
+explain select * from (select a.key, a.* from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME a)))))) t)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -82,9 +84,11 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: explain select * from (select a.key, a.`[k].*` from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+PREHOOK: query: -- DOT
+explain select * from (select a.key, a.`[k].*` from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select * from (select a.key, a.`[k].*` from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+POSTHOOK: query: -- DOT
+explain select * from (select a.key, a.`[k].*` from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) `[k].*`))))) t)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
@@ -160,9 +164,11 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: explain select * from (select a.key, a.key from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+PREHOOK: query: -- EXPRESSION
+explain select * from (select a.key, a.key from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select * from (select a.key, a.key from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
+POSTHOOK: query: -- EXPRESSION
+explain select * from (select a.key, a.key from (select * from src) a join (select * from src1) b on (a.key = b.key)) t
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) a) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key))))) t)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))

Modified: hive/trunk/ql/src/test/results/clientpositive/archive_multi.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/archive_multi.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/archive_multi.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/archive_multi.q.out Wed Apr 10 00:06:55 2013
@@ -104,14 +104,18 @@ POSTHOOK: Lineage: tstsrcpart PARTITION(
 POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-09,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
+PREHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.17, 0.18, 0.19)
+
+SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
 FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tstsrcpart
 PREHOOK: Input: default@tstsrcpart@ds=2008-04-08/hr=11
 PREHOOK: Input: default@tstsrcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
+POSTHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.17, 0.18, 0.19)
+
+SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
 FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tstsrcpart

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_1.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,11 @@
-PREHOOK: query: create table src_autho_test as select * from src
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: create table src_autho_test as select * from src
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@src_autho_test
@@ -416,9 +420,11 @@ PREHOOK: Output: default@src_autho_test
 POSTHOOK: query: revoke select on table src_autho_test from role src_role
 POSTHOOK: type: REVOKE_PRIVILEGE
 POSTHOOK: Output: default@src_autho_test
-PREHOOK: query: drop role src_role
+PREHOOK: query: -- drop role
+drop role src_role
 PREHOOK: type: DROPROLE
-POSTHOOK: query: drop role src_role
+POSTHOOK: query: -- drop role
+drop role src_role
 POSTHOOK: type: DROPROLE
 PREHOOK: query: drop table src_autho_test
 PREHOOK: type: DROPTABLE

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_2.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_2.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string)
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table authorization_part (key int, value string) partitioned by (ds string)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string)
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table authorization_part (key int, value string) partitioned by (ds string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@authorization_part
 PREHOOK: query: create table src_auth_tmp as select * from src
@@ -18,10 +22,12 @@ POSTHOOK: query: ALTER TABLE authorizati
 POSTHOOK: type: ALTERTABLE_PROPERTIES
 POSTHOOK: Input: default@authorization_part
 POSTHOOK: Output: default@authorization_part
-PREHOOK: query: grant Create on table authorization_part to user hive_test_user
+PREHOOK: query: -- column grant to user
+grant Create on table authorization_part to user hive_test_user
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@authorization_part
-POSTHOOK: query: grant Create on table authorization_part to user hive_test_user
+POSTHOOK: query: -- column grant to user
+grant Create on table authorization_part to user hive_test_user
 POSTHOOK: type: GRANT_PRIVILEGE
 POSTHOOK: Output: default@authorization_part
 PREHOOK: query: grant Update on table authorization_part to user hive_test_user
@@ -281,9 +287,11 @@ POSTHOOK: Input: default@authorization_p
 POSTHOOK: Output: default@authorization_part@ds=2010
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
-PREHOOK: query: show grant user hive_test_user on table authorization_part
+PREHOOK: query: -- table grant to user
+show grant user hive_test_user on table authorization_part
 PREHOOK: type: SHOW_GRANT
-POSTHOOK: query: show grant user hive_test_user on table authorization_part
+POSTHOOK: query: -- table grant to user
+show grant user hive_test_user on table authorization_part
 POSTHOOK: type: SHOW_GRANT
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
@@ -678,9 +686,13 @@ POSTHOOK: Lineage: authorization_part PA
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
-PREHOOK: query: show grant group hive_test_group1 on table authorization_part
+PREHOOK: query: -- column grant to group
+
+show grant group hive_test_group1 on table authorization_part
 PREHOOK: type: SHOW_GRANT
-POSTHOOK: query: show grant group hive_test_group1 on table authorization_part
+POSTHOOK: query: -- column grant to group
+
+show grant group hive_test_group1 on table authorization_part
 POSTHOOK: type: SHOW_GRANT
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
@@ -930,9 +942,11 @@ POSTHOOK: Lineage: authorization_part PA
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]
-PREHOOK: query: show grant group hive_test_group1 on table authorization_part
+PREHOOK: query: -- table grant to group
+show grant group hive_test_group1 on table authorization_part
 PREHOOK: type: SHOW_GRANT
-POSTHOOK: query: show grant group hive_test_group1 on table authorization_part
+POSTHOOK: query: -- table grant to group
+show grant group hive_test_group1 on table authorization_part
 POSTHOOK: type: SHOW_GRANT
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src_auth_tmp)src_auth_tmp.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src_auth_tmp)src_auth_tmp.FieldSchema(name:value, type:string, comment:null), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_3.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_3.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_3.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,11 @@
-PREHOOK: query: create table src_autho_test as select * from src
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: create table src_autho_test as select * from src
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@src_autho_test

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_4.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_4.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,11 @@
-PREHOOK: query: create table src_autho_test as select * from src
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: create table src_autho_test as select * from src
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_autho_test as select * from src
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@src_autho_test

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_5.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_5.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_5.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_5.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+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: -- SORT_BEFORE_DIFF
+
+CREATE DATABASE IF NOT EXISTS test_db COMMENT 'Hive test database'
 POSTHOOK: type: CREATEDATABASE
 PREHOOK: query: SHOW DATABASES
 PREHOOK: type: SHOWDATABASES

Modified: hive/trunk/ql/src/test/results/clientpositive/authorization_6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/authorization_6.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/authorization_6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/authorization_6.q.out Wed Apr 10 00:06:55 2013
@@ -1,7 +1,11 @@
-PREHOOK: query: create table src_auth_tmp as select * from src
+PREHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_auth_tmp as select * from src
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: create table src_auth_tmp as select * from src
+POSTHOOK: query: -- SORT_BEFORE_DIFF
+
+create table src_auth_tmp as select * from src
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@src_auth_tmp
@@ -24,10 +28,12 @@ PREHOOK: Output: default@src_auth_tmp
 POSTHOOK: query: grant select on table src_auth_tmp to user hive_test_user
 POSTHOOK: type: GRANT_PRIVILEGE
 POSTHOOK: Output: default@src_auth_tmp
-PREHOOK: query: grant Create on table authorization_part to user hive_test_user
+PREHOOK: query: -- column grant to user
+grant Create on table authorization_part to user hive_test_user
 PREHOOK: type: GRANT_PRIVILEGE
 PREHOOK: Output: default@authorization_part
-POSTHOOK: query: grant Create on table authorization_part to user hive_test_user
+POSTHOOK: query: -- column grant to user
+grant Create on table authorization_part to user hive_test_user
 POSTHOOK: type: GRANT_PRIVILEGE
 POSTHOOK: Output: default@authorization_part
 PREHOOK: query: grant Update on table authorization_part to user hive_test_user

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join14_hadoop20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_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/auto_join25.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join25.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join25.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join25.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
+PREHOOK: query: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin
+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: -- This test tests the scenario when the mapper dies. So, create a conditional task for the mapjoin
+CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@dest1
 PREHOOK: query: FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key)

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_smb_mapjoin_14.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_smb_mapjoin_14.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_smb_mapjoin_14.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_smb_mapjoin_14.q.out Wed Apr 10 00:06:55 2013
@@ -34,12 +34,14 @@ POSTHOOK: Lineage: tbl1.key EXPRESSION [
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
@@ -129,7 +131,8 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 22
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed as part of more than one sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from
 (
   select key, count(*) from 
@@ -139,7 +142,8 @@ select count(*) from
   group by key
 ) subq2
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed as part of more than one sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from
 (
   select key, count(*) from 
@@ -293,7 +297,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 6
-PREHOOK: query: explain
+PREHOOK: query: -- A join is being performed across different sub-queries, where a join is being performed in each of them.
+-- Each sub-query should be converted to a sort-merge join.
+explain
 select src1.key, src1.cnt1, src2.cnt1 from
 (
   select key, count(*) as cnt1 from 
@@ -311,7 +317,9 @@ join
 on src1.key = src2.key
 order by src1.key, src1.cnt1, src2.cnt1
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- A join is being performed across different sub-queries, where a join is being performed in each of them.
+-- Each sub-query should be converted to a sort-merge join.
+explain
 select src1.key, src1.cnt1, src2.cnt1 from
 (
   select key, count(*) as cnt1 from 
@@ -621,14 +629,18 @@ POSTHOOK: Lineage: tbl2.value SIMPLE [(s
 5	9	9
 8	1	1
 9	1	1
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -733,7 +745,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join, although there is more than one level of sub-query
+explain
 select count(*) from 
   (
   select * from
@@ -745,7 +759,9 @@ select count(*) from 
   join tbl2 b
   on subq2.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join, although there is more than one level of sub-query
+explain
 select count(*) from 
   (
   select * from
@@ -865,7 +881,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- Both the tables are nested sub-queries i.e more then 1 level of sub-query.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from 
   (
   select * from
@@ -884,7 +902,9 @@ select count(*) from 
   ) subq4
   on subq2.key = subq4.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- Both the tables are nested sub-queries i.e more then 1 level of sub-query.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from 
   (
   select * from
@@ -1023,14 +1043,20 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters and the join key
+-- is not getting modified, it should be converted to a sort-merge join. Note that the sub-query modifies one 
+-- item, but that is not part of the join key.
+explain
 select count(*) from 
   (select a.key as key, concat(a.value, a.value) as value from tbl1 a where key < 8) subq1 
     join
   (select a.key as key, concat(a.value, a.value) as value from tbl2 a where key < 8) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters and the join key
+-- is not getting modified, it should be converted to a sort-merge join. Note that the sub-query modifies one 
+-- item, but that is not part of the join key.
+explain
 select count(*) from 
   (select a.key as key, concat(a.value, a.value) as value from tbl1 a where key < 8) subq1 
     join
@@ -1135,14 +1161,18 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- Since the join key is modified by the sub-query, neither sort-merge join not bucketized map-side
+-- join should be performed
+explain
 select count(*) from 
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl1 a) subq1 
     join
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl2 a) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- Since the join key is modified by the sub-query, neither sort-merge join not bucketized map-side
+-- join should be performed
+explain
 select count(*) from 
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl1 a) subq1 
     join
@@ -1278,12 +1308,16 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 22
-PREHOOK: query: explain
+PREHOOK: query: -- One of the tables is a sub-query and the other is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join tbl2 a on subq1.key = a.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- One of the tables is a sub-query and the other is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join tbl2 a on subq1.key = a.key
@@ -1382,7 +1416,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- There are more than 2 inputs to the join, all of them being sub-queries. 
+-- It should be converted to to a sort-merge join
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -1392,7 +1428,9 @@ select count(*) from 
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq3
   on (subq1.key = subq3.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- There are more than 2 inputs to the join, all of them being sub-queries. 
+-- It should be converted to to a sort-merge join
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -1509,7 +1547,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 56
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed on a nested sub-query, and an aggregation is performed after that.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from (
   select subq2.key as key, subq2.value as value1, b.value as value2 from
   (
@@ -1522,7 +1562,9 @@ select count(*) from (
 join tbl2 b
 on subq2.key = b.key) a
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed on a nested sub-query, and an aggregation is performed after that.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from (
   select subq2.key as key, subq2.value as value1, b.value as value2 from
   (
@@ -1663,14 +1705,18 @@ POSTHOOK: Lineage: tbl1.key EXPRESSION [
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain
+PREHOOK: query: -- The join is followed by a multi-table insert. It should be converted to
+-- a sort-merge join
+explain
 from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
 insert overwrite table dest1 select key, val1
 insert overwrite table dest2 select key, val1, val2
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is followed by a multi-table insert. It should be converted to
+-- a sort-merge join
+explain
 from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
@@ -2009,14 +2055,18 @@ POSTHOOK: Lineage: tbl1.key EXPRESSION [
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain
+PREHOOK: query: -- The join is followed by a multi-table insert, and one of the inserts involves a reducer.
+-- It should be converted to a sort-merge join
+explain
 from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
 insert overwrite table dest1 select key, val1
 insert overwrite table dest2 select key, count(*) group by key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is followed by a multi-table insert, and one of the inserts involves a reducer.
+-- It should be converted to a sort-merge join
+explain
 from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_1.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,10 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 1 part, 2 bucket & big 2 part, 4 bucket
+
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 1 part, 2 bucket & big 2 part, 4 bucket
+
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -71,9 +75,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket4outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-09')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-09
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_10.q.out Wed Apr 10 00:06:55 2013
@@ -34,7 +34,8 @@ POSTHOOK: Lineage: tbl1.key EXPRESSION [
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain
+PREHOOK: query: -- One of the subqueries contains a union, so it should not be converted to a sort-merge join.
+explain
 select count(*) from 
   (
   select * from
@@ -46,7 +47,8 @@ select count(*) from 
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- One of the subqueries contains a union, so it should not be converted to a sort-merge join.
+explain
 select count(*) from 
   (
   select * from
@@ -262,14 +264,16 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 40
-PREHOOK: query: explain
+PREHOOK: query: -- One of the subqueries contains a groupby, so it should not be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, count(*) as value from tbl1 a where key < 6 group by a.key) subq1 
     join
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- One of the subqueries contains a groupby, so it should not be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, count(*) as value from tbl1 a where key < 6 group by a.key) subq1 
     join

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_2.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_2.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 1 part, 4 bucket & big 2 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 1 part, 4 bucket & big 2 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -59,9 +61,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket2outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-09')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-09
-PREHOOK: query: explain extended select count(*) FROM bucket_big a JOIN bucket_small b ON a.key = b.key
+PREHOOK: query: -- Since the leftmost table is assumed as the big table, arrange the tables in the join accordingly
+explain extended select count(*) FROM bucket_big a JOIN bucket_small b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_big a JOIN bucket_small b ON a.key = b.key
+POSTHOOK: query: -- Since the leftmost table is assumed as the big table, arrange the tables in the join accordingly
+explain extended select count(*) FROM bucket_big a JOIN bucket_small b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_big) a) (TOK_TABREF (TOK_TABNAME bucket_small) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_3.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_3.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_3.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 2 part, 2 bucket & big 1 part, 4 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 2 part, 2 bucket & big 1 part, 4 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -59,9 +61,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket4outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-08')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-08
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_4.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_4.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_4.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_4.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 2 part, 4 bucket & big 1 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 2 part, 4 bucket & big 1 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -71,9 +73,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket2outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-08')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-08
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small no part, 4 bucket & big no part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small no part, 4 bucket & big no part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small
@@ -44,9 +46,11 @@ PREHOOK: Output: default@bucket_big
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket2outof4.txt' INTO TABLE bucket_big
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_6.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_6.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_6.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_6.q.out Wed Apr 10 00:06:55 2013
@@ -70,9 +70,11 @@ POSTHOOK: Lineage: tbl3.key EXPRESSION [
 POSTHOOK: Lineage: tbl3.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl4.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.value = a.value
+PREHOOK: query: -- A SMB join is being followed by a regular join on a non-bucketed table on a different key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.value = a.value
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.value = a.value
+POSTHOOK: query: -- A SMB join is being followed by a regular join on a non-bucketed table on a different key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.value = a.value
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: tbl1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
@@ -207,9 +209,11 @@ POSTHOOK: Lineage: tbl3.value SIMPLE [(s
 POSTHOOK: Lineage: tbl4.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 2654
-PREHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.key = a.key
+PREHOOK: query: -- A SMB join is being followed by a regular join on a non-bucketed table on the same key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.key = a.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.key = a.key
+POSTHOOK: query: -- A SMB join is being followed by a regular join on a non-bucketed table on the same key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join src c on c.key = a.key
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: tbl1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
@@ -581,9 +585,11 @@ POSTHOOK: Lineage: tbl3.value SIMPLE [(s
 POSTHOOK: Lineage: tbl4.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 2654
-PREHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl3 c on c.key = a.key
+PREHOOK: query: -- A SMB join is being followed by a regular join on a bucketed table on the same key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl3 c on c.key = a.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl3 c on c.key = a.key
+POSTHOOK: query: -- A SMB join is being followed by a regular join on a bucketed table on the same key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl3 c on c.key = a.key
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: tbl1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
@@ -679,9 +685,11 @@ POSTHOOK: Lineage: tbl3.value SIMPLE [(s
 POSTHOOK: Lineage: tbl4.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl4.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 2654
-PREHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl4 c on c.value = a.value
+PREHOOK: query: -- A SMB join is being followed by a regular join on a bucketed table on a different key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl4 c on c.value = a.value
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl4 c on c.value = a.value
+POSTHOOK: query: -- A SMB join is being followed by a regular join on a bucketed table on a different key
+explain select count(*) FROM tbl1 a JOIN tbl2 b ON a.key = b.key join tbl4 c on c.value = a.value
 POSTHOOK: type: QUERY
 POSTHOOK: Lineage: tbl1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_7.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_7.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_7.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_7.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 2 part, 4 bucket & big 2 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 2 part, 4 bucket & big 2 part, 2 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -84,9 +86,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket2outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-09')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-09
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_8.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_8.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_8.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_8.q.out Wed Apr 10 00:06:55 2013
@@ -1,6 +1,8 @@
-PREHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+PREHOOK: query: -- small 2 part, 2 bucket & big 2 part, 4 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
+POSTHOOK: query: -- small 2 part, 2 bucket & big 2 part, 4 bucket
+CREATE TABLE bucket_small (key string, value string) partitioned by (ds string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@bucket_small
 PREHOOK: query: load data local inpath '../data/files/smallsrcsortbucket1outof4.txt' INTO TABLE bucket_small partition(ds='2008-04-08')
@@ -84,9 +86,11 @@ PREHOOK: Output: default@bucket_big@ds=2
 POSTHOOK: query: load data local inpath '../data/files/srcsortbucket4outof4.txt' INTO TABLE bucket_big partition(ds='2008-04-09')
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@bucket_big@ds=2008-04-09
-PREHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+PREHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
+POSTHOOK: query: -- Since size is being used to find the big table, the order of the tables in the join does not matter
+explain extended select count(*) FROM bucket_small a JOIN bucket_big b ON a.key = b.key
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME bucket_small) a) (TOK_TABREF (TOK_TABNAME bucket_big) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_sortmerge_join_9.q.out Wed Apr 10 00:06:55 2013
@@ -34,12 +34,14 @@ POSTHOOK: Lineage: tbl1.key EXPRESSION [
 POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
 ) subq1
@@ -129,7 +131,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 22
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+-- Add a order by at the end to make the results deterministic.
+explain
 select key, count(*) from 
 (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
@@ -137,7 +141,9 @@ select key, count(*) from 
 group by key
 order by key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed as part of sub-query. It should be converted to a sort-merge join
+-- Add a order by at the end to make the results deterministic.
+explain
 select key, count(*) from 
 (
   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
@@ -285,7 +291,8 @@ POSTHOOK: Lineage: tbl2.value SIMPLE [(s
 5	9
 8	1
 9	1
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed as part of more than one sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from
 (
   select key, count(*) from 
@@ -295,7 +302,8 @@ select count(*) from
   group by key
 ) subq2
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed as part of more than one sub-query. It should be converted to a sort-merge join
+explain
 select count(*) from
 (
   select key, count(*) from 
@@ -449,7 +457,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 6
-PREHOOK: query: explain
+PREHOOK: query: -- A join is being performed across different sub-queries, where a join is being performed in each of them.
+-- Each sub-query should be converted to a sort-merge join.
+explain
 select src1.key, src1.cnt1, src2.cnt1 from
 (
   select key, count(*) as cnt1 from 
@@ -467,7 +477,9 @@ join
 on src1.key = src2.key
 order by src1.key, src1.cnt1, src2.cnt1
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- A join is being performed across different sub-queries, where a join is being performed in each of them.
+-- Each sub-query should be converted to a sort-merge join.
+explain
 select src1.key, src1.cnt1, src2.cnt1 from
 (
   select key, count(*) as cnt1 from 
@@ -889,14 +901,18 @@ POSTHOOK: Lineage: tbl2.value SIMPLE [(s
 5	9	9
 8	1	1
 9	1	1
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -1001,7 +1017,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join, although there is more than one level of sub-query
+explain
 select count(*) from 
   (
   select * from
@@ -1013,7 +1031,9 @@ select count(*) from 
   join tbl2 b
   on subq2.key = b.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters, it should 
+-- be converted to a sort-merge join, although there is more than one level of sub-query
+explain
 select count(*) from 
   (
   select * from
@@ -1133,7 +1153,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- Both the tables are nested sub-queries i.e more then 1 level of sub-query.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from 
   (
   select * from
@@ -1152,7 +1174,9 @@ select count(*) from 
   ) subq4
   on subq2.key = subq4.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- Both the tables are nested sub-queries i.e more then 1 level of sub-query.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from 
   (
   select * from
@@ -1291,14 +1315,20 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters and the join key
+-- is not getting modified, it should be converted to a sort-merge join. Note that the sub-query modifies one 
+-- item, but that is not part of the join key.
+explain
 select count(*) from 
   (select a.key as key, concat(a.value, a.value) as value from tbl1 a where key < 8) subq1 
     join
   (select a.key as key, concat(a.value, a.value) as value from tbl2 a where key < 8) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The subquery itself is being joined. Since the sub-query only contains selects and filters and the join key
+-- is not getting modified, it should be converted to a sort-merge join. Note that the sub-query modifies one 
+-- item, but that is not part of the join key.
+explain
 select count(*) from 
   (select a.key as key, concat(a.value, a.value) as value from tbl1 a where key < 8) subq1 
     join
@@ -1403,14 +1433,18 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- Since the join key is modified by the sub-query, neither sort-merge join not bucketized mapside
+-- join should be performed
+explain
 select count(*) from 
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl1 a) subq1 
     join
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl2 a) subq2
   on subq1.key = subq2.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- Since the join key is modified by the sub-query, neither sort-merge join not bucketized mapside
+-- join should be performed
+explain
 select count(*) from 
   (select a.key +1 as key, concat(a.value, a.value) as value from tbl1 a) subq1 
     join
@@ -1551,12 +1585,16 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 22
-PREHOOK: query: explain
+PREHOOK: query: -- The left table is a sub-query and the right table is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join tbl2 a on subq1.key = a.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The left table is a sub-query and the right table is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join tbl2 a on subq1.key = a.key
@@ -1655,13 +1693,17 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- The right table is a sub-query and the left table is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from tbl1 a
   join
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq1 
   on a.key = subq1.key
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The right table is a sub-query and the left table is not.
+-- It should be converted to a sort-merge join.
+explain
 select count(*) from tbl1 a
   join
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq1 
@@ -1754,7 +1796,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 20
-PREHOOK: query: explain
+PREHOOK: query: -- There are more than 2 inputs to the join, all of them being sub-queries. 
+-- It should be converted to to a sort-merge join
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -1764,7 +1808,9 @@ select count(*) from 
   (select a.key as key, a.value as value from tbl2 a where key < 6) subq3
   on (subq1.key = subq3.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- There are more than 2 inputs to the join, all of them being sub-queries. 
+-- It should be converted to to a sort-merge join
+explain
 select count(*) from 
   (select a.key as key, a.value as value from tbl1 a where key < 6) subq1 
     join
@@ -1881,7 +1927,9 @@ POSTHOOK: Lineage: tbl1.value SIMPLE [(s
 POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 56
-PREHOOK: query: explain
+PREHOOK: query: -- The join is being performed on a nested sub-query, and an aggregation is performed after that.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from (
   select subq2.key as key, subq2.value as value1, b.value as value2 from
   (
@@ -1894,7 +1942,9 @@ select count(*) from (
 join tbl2 b
 on subq2.key = b.key) a
 PREHOOK: type: QUERY
-POSTHOOK: query: explain
+POSTHOOK: query: -- The join is being performed on a nested sub-query, and an aggregation is performed after that.
+-- The join should be converted to a sort-merge join
+explain
 select count(*) from (
   select subq2.key as key, subq2.value as value1, b.value as value2 from
   (

Modified: hive/trunk/ql/src/test/results/clientpositive/autogen_colalias.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/autogen_colalias.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/autogen_colalias.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/autogen_colalias.q.out Wed Apr 10 00:06:55 2013
@@ -88,7 +88,9 @@ POSTHOOK: type: DESCTABLE
 # col_name            	data_type           	comment             
 	 	 
 key                 	string              	None                
-PREHOOK: query: DROP TEMPORARY FUNCTION test_max
+PREHOOK: query: -- Drop the temporary function at the end till HIVE-3160 gets fixed
+DROP TEMPORARY FUNCTION test_max
 PREHOOK: type: DROPFUNCTION
-POSTHOOK: query: DROP TEMPORARY FUNCTION test_max
+POSTHOOK: query: -- Drop the temporary function at the end till HIVE-3160 gets fixed
+DROP TEMPORARY FUNCTION test_max
 POSTHOOK: type: DROPFUNCTION

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_change_schema.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_change_schema.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_change_schema.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_change_schema.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,5 @@
-PREHOOK: query: CREATE TABLE avro2
+PREHOOK: query: -- verify that we can update the table properties
+CREATE TABLE avro2
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
@@ -12,7 +13,8 @@ TBLPROPERTIES ('avro.schema.literal'='{ 
     { "name":"string2", "type":"string" }
   ] }')
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE avro2
+POSTHOOK: query: -- verify that we can update the table properties
+CREATE TABLE avro2
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_compression_enabled.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_compression_enabled.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_compression_enabled.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_compression_enabled.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,6 @@
-PREHOOK: query: CREATE TABLE doctors4
+PREHOOK: query: -- verify that new joins bring in correct schemas (including evolved schemas)
+
+CREATE TABLE doctors4
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
@@ -33,7 +35,9 @@ TBLPROPERTIES ('avro.schema.literal'='{
   ]
 }')
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE doctors4
+POSTHOOK: query: -- verify that new joins bring in correct schemas (including evolved schemas)
+
+CREATE TABLE doctors4
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_evolved_schemas.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_evolved_schemas.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_evolved_schemas.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_evolved_schemas.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,5 @@
-PREHOOK: query: CREATE TABLE doctors_with_new_field 
+PREHOOK: query: -- verify that new fields in schema get propagated to table scans
+CREATE TABLE doctors_with_new_field 
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
@@ -33,7 +34,8 @@ TBLPROPERTIES ('avro.schema.literal'='{
   ]
 }')
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE doctors_with_new_field 
+POSTHOOK: query: -- verify that new fields in schema get propagated to table scans
+CREATE TABLE doctors_with_new_field 
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_joins.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_joins.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_joins.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_joins.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,6 @@
-PREHOOK: query: CREATE TABLE doctors4
+PREHOOK: query: -- verify that new joins bring in correct schemas (including evolved schemas)
+
+CREATE TABLE doctors4
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
@@ -33,7 +35,9 @@ TBLPROPERTIES ('avro.schema.literal'='{
   ]
 }')
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE doctors4
+POSTHOOK: query: -- verify that new joins bring in correct schemas (including evolved schemas)
+
+CREATE TABLE doctors4
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_nullable_fields.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_nullable_fields.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_nullable_fields.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_nullable_fields.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,5 @@
-PREHOOK: query: CREATE TABLE test_serializer(string1 STRING,
+PREHOOK: query: -- Verify that nullable fields properly work
+CREATE TABLE test_serializer(string1 STRING,
                              int1 INT,
                              tinyint1 TINYINT,
                              smallint1 SMALLINT,
@@ -16,7 +17,8 @@ PREHOOK: query: CREATE TABLE test_serial
  ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' COLLECTION ITEMS TERMINATED BY ':' MAP KEYS TERMINATED BY '#' LINES TERMINATED BY '\n'
  STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE test_serializer(string1 STRING,
+POSTHOOK: query: -- Verify that nullable fields properly work
+CREATE TABLE test_serializer(string1 STRING,
                              int1 INT,
                              tinyint1 TINYINT,
                              smallint1 SMALLINT,

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_sanity_test.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_sanity_test.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_sanity_test.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_sanity_test.q.out Wed Apr 10 00:06:55 2013
@@ -1,4 +1,5 @@
-PREHOOK: query: CREATE TABLE doctors 
+PREHOOK: query: -- verify that we can actually read avro files
+CREATE TABLE doctors 
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
@@ -27,7 +28,8 @@ TBLPROPERTIES ('avro.schema.literal'='{
   ]
 }')
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE doctors 
+POSTHOOK: query: -- verify that we can actually read avro files
+CREATE TABLE doctors 
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/avro_schema_error_message.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/avro_schema_error_message.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/avro_schema_error_message.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/avro_schema_error_message.q.out Wed Apr 10 00:06:55 2013
@@ -1,11 +1,15 @@
-PREHOOK: query: CREATE TABLE avro_with_no_schema
+PREHOOK: query: -- verify we get the sentinel schema if we don't provide one
+
+CREATE TABLE avro_with_no_schema
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
 INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
 OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: CREATE TABLE avro_with_no_schema
+POSTHOOK: query: -- verify we get the sentinel schema if we don't provide one
+
+CREATE TABLE avro_with_no_schema
 ROW FORMAT
 SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS

Modified: hive/trunk/ql/src/test/results/clientpositive/ba_table1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ba_table1.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ba_table1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ba_table1.q.out Wed Apr 10 00:06:55 2013
@@ -2,9 +2,13 @@ PREHOOK: query: drop table ba_test
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table ba_test
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+PREHOOK: query: -- This query tests a) binary type works correctly in grammar b) string can be cast into binary c) binary can be stored in a table d) binary data can be loaded back again and queried d) order-by on a binary key 
+
+create table ba_test (ba_key binary, ba_val binary)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+POSTHOOK: query: -- This query tests a) binary type works correctly in grammar b) string can be cast into binary c) binary can be stored in a table d) binary data can be loaded back again and queried d) order-by on a binary key 
+
+create table ba_test (ba_key binary, ba_val binary)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@ba_test
 PREHOOK: query: describe extended ba_test

Modified: hive/trunk/ql/src/test/results/clientpositive/ba_table2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ba_table2.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ba_table2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ba_table2.q.out Wed Apr 10 00:06:55 2013
@@ -2,9 +2,13 @@ PREHOOK: query: drop table ba_test
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table ba_test
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+PREHOOK: query: -- All the test in ba_test1.q + using LazyBinarySerde instead of LazySimpleSerde
+
+create table ba_test (ba_key binary, ba_val binary)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+POSTHOOK: query: -- All the test in ba_test1.q + using LazyBinarySerde instead of LazySimpleSerde
+
+create table ba_test (ba_key binary, ba_val binary)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@ba_test
 PREHOOK: query: alter table ba_test set serde 'org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe'

Modified: hive/trunk/ql/src/test/results/clientpositive/ba_table3.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ba_table3.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ba_table3.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ba_table3.q.out Wed Apr 10 00:06:55 2013
@@ -2,9 +2,13 @@ PREHOOK: query: drop table ba_test
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table ba_test
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+PREHOOK: query: -- All the tests of ba_table1.q + test for a group-by and aggregation on a binary key.
+
+create table ba_test (ba_key binary, ba_val binary)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+POSTHOOK: query: -- All the tests of ba_table1.q + test for a group-by and aggregation on a binary key.
+
+create table ba_test (ba_key binary, ba_val binary)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@ba_test
 PREHOOK: query: from src insert overwrite table ba_test select cast (src.key as binary), cast (src.value as binary)

Modified: hive/trunk/ql/src/test/results/clientpositive/ba_table_udfs.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ba_table_udfs.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ba_table_udfs.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ba_table_udfs.q.out Wed Apr 10 00:06:55 2013
@@ -2,7 +2,9 @@ PREHOOK: query: USE default
 PREHOOK: type: SWITCHDATABASE
 POSTHOOK: query: USE default
 POSTHOOK: type: SWITCHDATABASE
-PREHOOK: query: SELECT
+PREHOOK: query: -- this query tests all the udfs provided to work with binary types
+
+SELECT
   key,
   value,
   LENGTH(CAST(src.key AS BINARY)),
@@ -17,7 +19,9 @@ LIMIT 100
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT
+POSTHOOK: query: -- this query tests all the udfs provided to work with binary types
+
+SELECT
   key,
   value,
   LENGTH(CAST(src.key AS BINARY)),

Modified: hive/trunk/ql/src/test/results/clientpositive/ba_table_union.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/ba_table_union.q.out?rev=1466300&r1=1466299&r2=1466300&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/ba_table_union.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/ba_table_union.q.out Wed Apr 10 00:06:55 2013
@@ -2,9 +2,11 @@ PREHOOK: query: drop table ba_test
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table ba_test
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+PREHOOK: query: -- this query tests ba_table1.q + nested queries with multiple operations on binary data types + union on binary types 
+create table ba_test (ba_key binary, ba_val binary)
 PREHOOK: type: CREATETABLE
-POSTHOOK: query: create table ba_test (ba_key binary, ba_val binary)
+POSTHOOK: query: -- this query tests ba_table1.q + nested queries with multiple operations on binary data types + union on binary types 
+create table ba_test (ba_key binary, ba_val binary)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@ba_test
 PREHOOK: query: describe extended ba_test



Mime
View raw message