http://git-wip-us.apache.org/repos/asf/hive/blob/4ea77ecb/ql/src/test/results/clientpositive/auto_sortmerge_join_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_sortmerge_join_13.q.out 
b/ql/src/test/results/clientpositive/auto_sortmerge_join_13.q.out
deleted file mode 100644
index ac143dd..0000000
--- a/ql/src/test/results/clientpositive/auto_sortmerge_join_13.q.out
+++ /dev/null
@@ -1,775 +0,0 @@
-PREHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl1
-PREHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl2
-PREHOOK: query: insert overwrite table tbl1 select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: insert overwrite table tbl1 select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl1
-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), ]
-PREHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl2
-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: CREATE TABLE dest1(k1 int, k2 int)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest1
-POSTHOOK: query: CREATE TABLE dest1(k1 int, k2 int)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest1
-PREHOOK: query: CREATE TABLE dest2(k1 string, k2 string)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest2
-POSTHOOK: query: CREATE TABLE dest2(k1 string, k2 string)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest2
-PREHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-POSTHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-0 depends on stages: Stage-2
-  Stage-3 depends on stages: Stage-0, Stage-5
-  Stage-1 depends on stages: Stage-2
-  Stage-4 depends on stages: Stage-1, Stage-5
-  Stage-5 depends on stages: Stage-2
-
-STAGE PLANS:
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              Select Operator
-                expressions: key (type: int), value (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-                Sorted Merge Bucket Map Join Operator
-                  condition map:
-                       Inner Join 0 to 1
-                  keys:
-                    0 _col0 (type: int)
-                    1 _col0 (type: int)
-                  outputColumnNames: _col0, _col1, _col2, _col3
-                  Select Operator
-                    expressions: _col0 (type: int), _col2 (type: int)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest1
-                    Select Operator
-                      expressions: _col0 (type: int), _col1 (type: int)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
-                  Select Operator
-                    expressions: _col1 (type: string), _col3 (type: string)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest2
-                    Select Operator
-                      expressions: _col0 (type: string), _col1 (type: string)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest1
-
-  Stage: Stage-3
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: int, int
-          Table: default.dest1
-
-  Stage: Stage-1
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest2
-
-  Stage: Stage-4
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: string, string
-          Table: default.dest2
-
-  Stage: Stage-5
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              sort order: 
-              value expressions: _col0 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-PREHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@tbl1
-PREHOOK: Input: default@tbl2
-PREHOOK: Output: default@dest1
-PREHOOK: Output: default@dest2
-POSTHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@tbl1
-POSTHOOK: Input: default@tbl2
-POSTHOOK: Output: default@dest1
-POSTHOOK: Output: default@dest2
-POSTHOOK: Lineage: dest1.k1 SIMPLE [(tbl1)a.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest1.k2 SIMPLE [(tbl2)b.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest2.k1 SIMPLE [(tbl1)a.FieldSchema(name:value, 
type:string, comment:null), ]
-POSTHOOK: Lineage: dest2.k2 SIMPLE [(tbl2)b.FieldSchema(name:value, 
type:string, comment:null), ]
-PREHOOK: query: select * from dest1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest1
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest1
-#### A masked pattern was here ####
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-2      2
-4      4
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-8      8
-9      9
-PREHOOK: query: select * from dest2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest2
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest2
-#### A masked pattern was here ####
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_2  val_2
-val_4  val_4
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_8  val_8
-val_9  val_9
-PREHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-POSTHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-0 depends on stages: Stage-2
-  Stage-3 depends on stages: Stage-0, Stage-5
-  Stage-1 depends on stages: Stage-2
-  Stage-4 depends on stages: Stage-1, Stage-5
-  Stage-5 depends on stages: Stage-2
-
-STAGE PLANS:
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              Select Operator
-                expressions: key (type: int), value (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-                Sorted Merge Bucket Map Join Operator
-                  condition map:
-                       Inner Join 0 to 1
-                  keys:
-                    0 _col0 (type: int)
-                    1 _col0 (type: int)
-                  outputColumnNames: _col0, _col1, _col2, _col3
-                  Select Operator
-                    expressions: _col0 (type: int), _col2 (type: int)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest1
-                    Select Operator
-                      expressions: _col0 (type: int), _col1 (type: int)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
-                  Select Operator
-                    expressions: _col1 (type: string), _col3 (type: string)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest2
-                    Select Operator
-                      expressions: _col0 (type: string), _col1 (type: string)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest1
-
-  Stage: Stage-3
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: int, int
-          Table: default.dest1
-
-  Stage: Stage-1
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest2
-
-  Stage: Stage-4
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: string, string
-          Table: default.dest2
-
-  Stage: Stage-5
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              sort order: 
-              value expressions: _col0 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-PREHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@tbl1
-PREHOOK: Input: default@tbl2
-PREHOOK: Output: default@dest1
-PREHOOK: Output: default@dest2
-POSTHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@tbl1
-POSTHOOK: Input: default@tbl2
-POSTHOOK: Output: default@dest1
-POSTHOOK: Output: default@dest2
-POSTHOOK: Lineage: dest1.k1 SIMPLE [(tbl1)a.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest1.k2 SIMPLE [(tbl2)b.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest2.k1 SIMPLE [(tbl1)a.FieldSchema(name:value, 
type:string, comment:null), ]
-POSTHOOK: Lineage: dest2.k2 SIMPLE [(tbl2)b.FieldSchema(name:value, 
type:string, comment:null), ]
-PREHOOK: query: select * from dest1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest1
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest1
-#### A masked pattern was here ####
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-2      2
-4      4
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-8      8
-9      9
-PREHOOK: query: select * from dest2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest2
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest2
-#### A masked pattern was here ####
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_2  val_2
-val_4  val_4
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_8  val_8
-val_9  val_9
-PREHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-POSTHOOK: query: explain 
-from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-2 is a root stage
-  Stage-0 depends on stages: Stage-2
-  Stage-3 depends on stages: Stage-0, Stage-5
-  Stage-1 depends on stages: Stage-2
-  Stage-4 depends on stages: Stage-1, Stage-5
-  Stage-5 depends on stages: Stage-2
-
-STAGE PLANS:
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              Select Operator
-                expressions: key (type: int), value (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-                Sorted Merge Bucket Map Join Operator
-                  condition map:
-                       Inner Join 0 to 1
-                  keys:
-                    0 _col0 (type: int)
-                    1 _col0 (type: int)
-                  outputColumnNames: _col0, _col1, _col2, _col3
-                  Select Operator
-                    expressions: _col0 (type: int), _col2 (type: int)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest1
-                    Select Operator
-                      expressions: _col0 (type: int), _col1 (type: int)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        Reduce Output Operator
-                          sort order: 
-                          value expressions: _col0 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
-                  Select Operator
-                    expressions: _col1 (type: string), _col3 (type: string)
-                    outputColumnNames: _col0, _col1
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: 
org.apache.hadoop.mapred.TextInputFormat
-                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                          name: default.dest2
-                    Select Operator
-                      expressions: _col0 (type: string), _col1 (type: string)
-                      outputColumnNames: k1, k2
-                      Group By Operator
-                        aggregations: compute_stats(k1, 'hll'), 
compute_stats(k2, 'hll')
-                        mode: hash
-                        outputColumnNames: _col0, _col1
-                        File Output Operator
-                          compressed: false
-                          table:
-                              input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest1
-
-  Stage: Stage-3
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: int, int
-          Table: default.dest1
-
-  Stage: Stage-1
-    Move Operator
-      tables:
-          replace: true
-          table:
-              input format: org.apache.hadoop.mapred.TextInputFormat
-              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.dest2
-
-  Stage: Stage-4
-    Stats Work
-      Basic Stats Work:
-      Column Stats Desc:
-          Columns: k1, k2
-          Column Types: string, string
-          Table: default.dest2
-
-  Stage: Stage-5
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              sort order: 
-              value expressions: _col0 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>),
 _col1 (type: 
struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-PREHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@tbl1
-PREHOOK: Input: default@tbl2
-PREHOOK: Output: default@dest1
-PREHOOK: Output: default@dest2
-POSTHOOK: query: from (
-  SELECT a.key key1, a.value value1, b.key key2, b.value value2 
-  FROM tbl1 a JOIN tbl2 b 
-  ON a.key = b.key ) subq
-INSERT OVERWRITE TABLE dest1 select key1, key2
-INSERT OVERWRITE TABLE dest2 select value1, value2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@tbl1
-POSTHOOK: Input: default@tbl2
-POSTHOOK: Output: default@dest1
-POSTHOOK: Output: default@dest2
-POSTHOOK: Lineage: dest1.k1 SIMPLE [(tbl1)a.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest1.k2 SIMPLE [(tbl2)b.FieldSchema(name:key, type:int, 
comment:null), ]
-POSTHOOK: Lineage: dest2.k1 SIMPLE [(tbl1)a.FieldSchema(name:value, 
type:string, comment:null), ]
-POSTHOOK: Lineage: dest2.k2 SIMPLE [(tbl2)b.FieldSchema(name:value, 
type:string, comment:null), ]
-PREHOOK: query: select * from dest1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest1
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest1
-#### A masked pattern was here ####
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-0      0
-2      2
-4      4
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-5      5
-8      8
-9      9
-PREHOOK: query: select * from dest2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@dest2
-#### A masked pattern was here ####
-POSTHOOK: query: select * from dest2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@dest2
-#### A masked pattern was here ####
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_0  val_0
-val_2  val_2
-val_4  val_4
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_5  val_5
-val_8  val_8
-val_9  val_9

http://git-wip-us.apache.org/repos/asf/hive/blob/4ea77ecb/ql/src/test/results/clientpositive/auto_sortmerge_join_14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_sortmerge_join_14.q.out 
b/ql/src/test/results/clientpositive/auto_sortmerge_join_14.q.out
deleted file mode 100644
index f12bf98..0000000
--- a/ql/src/test/results/clientpositive/auto_sortmerge_join_14.q.out
+++ /dev/null
@@ -1,298 +0,0 @@
-PREHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl1
-PREHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl2
-PREHOOK: query: insert overwrite table tbl1 select * from src where key < 20
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: insert overwrite table tbl1 select * from src where key < 20
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl1
-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), ]
-PREHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl2
-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
-select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = b.key
-PREHOOK: type: QUERY
-POSTHOOK: query: explain
-select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = b.key
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-4 is a root stage , consists of Stage-5, Stage-1
-  Stage-5 has a backup stage: Stage-1
-  Stage-3 depends on stages: Stage-5
-  Stage-1
-  Stage-0 depends on stages: Stage-3, Stage-1
-
-STAGE PLANS:
-  Stage: Stage-4
-    Conditional Operator
-
-  Stage: Stage-5
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        $hdt$_1:b 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        $hdt$_1:b 
-          TableScan
-            alias: b
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-
-  Stage: Stage-3
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Local Work:
-        Map Reduce Local Work
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              Sorted Merge Bucket Map Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = 
b.key
-PREHOOK: type: QUERY
-PREHOOK: Input: default@tbl1
-PREHOOK: Input: default@tbl2
-#### A masked pattern was here ####
-POSTHOOK: query: select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = 
b.key
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@tbl1
-POSTHOOK: Input: default@tbl2
-#### A masked pattern was here ####
-32
-PREHOOK: query: insert overwrite table tbl2 select * from src where key < 200
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: insert overwrite table tbl2 select * from src where key < 200
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl2
-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
-select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key = b.key
-PREHOOK: type: QUERY
-POSTHOOK: query: explain
-select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key = b.key
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-4 is a root stage , consists of Stage-5, Stage-1
-  Stage-5 has a backup stage: Stage-1
-  Stage-3 depends on stages: Stage-5
-  Stage-1
-  Stage-0 depends on stages: Stage-3, Stage-1
-
-STAGE PLANS:
-  Stage: Stage-4
-    Conditional Operator
-
-  Stage: Stage-5
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        $hdt$_0:a 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        $hdt$_0:a 
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-
-  Stage: Stage-3
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: b
-            Statistics: Num rows: 189 Data size: 1891 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 189 Data size: 1891 Basic stats: COMPLETE 
Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Right Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Local Work:
-        Map Reduce Local Work
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: b
-            Statistics: Num rows: 189 Data size: 1891 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 189 Data size: 1891 Basic stats: COMPLETE 
Column stats: NONE
-              Sorted Merge Bucket Map Join Operator
-                condition map:
-                     Right Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key = 
b.key
-PREHOOK: type: QUERY
-PREHOOK: Input: default@tbl1
-PREHOOK: Input: default@tbl2
-#### A masked pattern was here ####
-POSTHOOK: query: select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key 
= b.key
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@tbl1
-POSTHOOK: Input: default@tbl2
-#### A masked pattern was here ####
-207

http://git-wip-us.apache.org/repos/asf/hive/blob/4ea77ecb/ql/src/test/results/clientpositive/auto_sortmerge_join_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_sortmerge_join_15.q.out 
b/ql/src/test/results/clientpositive/auto_sortmerge_join_15.q.out
deleted file mode 100644
index 827708c..0000000
--- a/ql/src/test/results/clientpositive/auto_sortmerge_join_15.q.out
+++ /dev/null
@@ -1,266 +0,0 @@
-PREHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl1
-PREHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) 
SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl2
-PREHOOK: query: insert overwrite table tbl1 select * from src where key < 20
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: insert overwrite table tbl1 select * from src where key < 20
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl1
-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), ]
-PREHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: insert overwrite table tbl2 select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl2
-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
-select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = b.key
-PREHOOK: type: QUERY
-POSTHOOK: query: explain
-select count(*) FROM tbl1 a LEFT OUTER JOIN tbl2 b ON a.key = b.key
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-4 is a root stage , consists of Stage-5, Stage-1
-  Stage-5 has a backup stage: Stage-1
-  Stage-3 depends on stages: Stage-5
-  Stage-1
-  Stage-0 depends on stages: Stage-3, Stage-1
-
-STAGE PLANS:
-  Stage: Stage-4
-    Conditional Operator
-
-  Stage: Stage-5
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        $hdt$_1:b 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        $hdt$_1:b 
-          TableScan
-            alias: b
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-
-  Stage: Stage-3
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Local Work:
-        Map Reduce Local Work
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              Sorted Merge Bucket Map Join Operator
-                condition map:
-                     Left Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: explain
-select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key = b.key
-PREHOOK: type: QUERY
-POSTHOOK: query: explain
-select count(*) FROM tbl1 a RIGHT OUTER JOIN tbl2 b ON a.key = b.key
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-4 is a root stage , consists of Stage-5, Stage-1
-  Stage-5 has a backup stage: Stage-1
-  Stage-3 depends on stages: Stage-5
-  Stage-1
-  Stage-0 depends on stages: Stage-3, Stage-1
-
-STAGE PLANS:
-  Stage: Stage-4
-    Conditional Operator
-
-  Stage: Stage-5
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        $hdt$_0:a 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        $hdt$_0:a 
-          TableScan
-            alias: a
-            Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 20 Data size: 160 Basic stats: COMPLETE 
Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-
-  Stage: Stage-3
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: b
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Right Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Local Work:
-        Map Reduce Local Work
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: b
-            Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE 
Column stats: NONE
-              Sorted Merge Bucket Map Join Operator
-                condition map:
-                     Right Outer Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                Group By Operator
-                  aggregations: count()
-                  mode: hash
-                  outputColumnNames: _col0
-                  Reduce Output Operator
-                    sort order: 
-                    value expressions: _col0 (type: bigint)
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: count(VALUE._col0)
-          mode: mergepartial
-          outputColumnNames: _col0
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-

Reply via email to