You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2014/12/16 02:13:30 UTC

svn commit: r1645808 [32/49] - in /hive/trunk: accumulo-handler/src/test/results/positive/ common/src/java/org/apache/hadoop/hive/conf/ contrib/src/test/results/clientpositive/ hbase-handler/src/test/results/positive/ itests/hive-unit/src/test/java/org...

Modified: hive/trunk/ql/src/test/results/clientpositive/skewjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/skewjoin.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/skewjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/skewjoin.q.out Tue Dec 16 01:13:24 2014
@@ -96,35 +96,43 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
-            alias: src2
+            alias: src1
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                value expressions: value (type: string)
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           handleSkewJoin: true
           keys:
-            0 key (type: string)
-            1 key (type: string)
-          outputColumnNames: _col0, _col6
+            0 _col0 (type: string)
+            1 _col0 (type: string)
+          outputColumnNames: _col1, _col2
           Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: UDFToInteger(_col0) (type: int), _col6 (type: string)
+            expressions: UDFToInteger(_col2) (type: int), _col1 (type: string)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -163,9 +171,9 @@ STAGE PLANS:
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-              outputColumnNames: _col0, _col6
+              outputColumnNames: _col1, _col2
               Select Operator
-                expressions: UDFToInteger(_col0) (type: int), _col6 (type: string)
+                expressions: UDFToInteger(_col2) (type: int), _col1 (type: string)
                 outputColumnNames: _col0, _col1
                 File Output Operator
                   compressed: false
@@ -201,7 +209,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dest_j1
 POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src1.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT sum(hash(key)), sum(hash(value)) FROM dest_j1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@dest_j1
@@ -585,14 +593,15 @@ STAGE PLANS:
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: string)
-                outputColumnNames: _col0
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
@@ -600,15 +609,14 @@ STAGE PLANS:
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: string), value (type: string)
-                outputColumnNames: _col0, _col1
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -617,19 +625,23 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col2, _col3
+          outputColumnNames: _col0, _col1
           Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
-          Group By Operator
-            aggregations: sum(hash(_col2)), sum(hash(_col3))
-            mode: hash
+          Select Operator
+            expressions: hash(_col0) (type: int), hash(_col1) (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
-            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
+            Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
+            Group By Operator
+              aggregations: sum(_col0), sum(_col1)
+              mode: hash
+              outputColumnNames: _col0, _col1
+              Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+              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
 
   Stage: Stage-5
     Conditional Operator
@@ -658,17 +670,20 @@ STAGE PLANS:
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-              outputColumnNames: _col2, _col3
-              Group By Operator
-                aggregations: sum(hash(_col2)), sum(hash(_col3))
-                mode: hash
+              outputColumnNames: _col0, _col1
+              Select Operator
+                expressions: hash(_col0) (type: int), hash(_col1) (type: int)
                 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
+                Group By Operator
+                  aggregations: sum(_col0), sum(_col1)
+                  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
       Local Work:
         Map Reduce Local Work
 
@@ -768,16 +783,16 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key is not null and (substring(value, 5) + 1) is not null) (type: boolean)
+              predicate: (key is not null and (UDFToDouble(substring(value, 5)) + 1.0) is not null) (type: boolean)
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: string), (substring(_col1, 5) + 1) (type: double)
+                  key expressions: _col0 (type: string), (UDFToDouble(substring(_col1, 5)) + 1.0) (type: double)
                   sort order: ++
-                  Map-reduce partition columns: _col0 (type: string), (substring(_col1, 5) + 1) (type: double)
+                  Map-reduce partition columns: _col0 (type: string), (UDFToDouble(substring(_col1, 5)) + 1.0) (type: double)
                   Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
       Reduce Operator Tree:
@@ -787,20 +802,24 @@ STAGE PLANS:
           handleSkewJoin: true
           keys:
             0 _col0 (type: string), UDFToDouble(substring(_col1, 5)) (type: double)
-            1 _col0 (type: string), (substring(_col1, 5) + 1) (type: double)
+            1 _col0 (type: string), (UDFToDouble(substring(_col1, 5)) + 1.0) (type: double)
           outputColumnNames: _col2, _col3
           Statistics: Num rows: 137 Data size: 1460 Basic stats: COMPLETE Column stats: NONE
-          Group By Operator
-            aggregations: sum(hash(_col2)), sum(hash(_col3))
-            mode: hash
+          Select Operator
+            expressions: hash(_col2) (type: int), hash(_col3) (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
-            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
+            Statistics: Num rows: 137 Data size: 1460 Basic stats: COMPLETE Column stats: NONE
+            Group By Operator
+              aggregations: sum(_col0), sum(_col1)
+              mode: hash
+              outputColumnNames: _col0, _col1
+              Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+              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
 
   Stage: Stage-5
     Conditional Operator
@@ -830,16 +849,19 @@ STAGE PLANS:
                 0 reducesinkkey0 (type: string), reducesinkkey1 (type: double)
                 1 reducesinkkey0 (type: string), reducesinkkey1 (type: double)
               outputColumnNames: _col2, _col3
-              Group By Operator
-                aggregations: sum(hash(_col2)), sum(hash(_col3))
-                mode: hash
+              Select Operator
+                expressions: hash(_col2) (type: int), hash(_col3) (type: int)
                 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
+                Group By Operator
+                  aggregations: sum(_col0), sum(_col1)
+                  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
       Local Work:
         Map Reduce Local Work
 
@@ -917,55 +939,42 @@ JOIN
 ON src1.c1 = src3.c5 AND src3.c5 < 80
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-7 depends on stages: Stage-1 , consists of Stage-8, Stage-9, Stage-2
-  Stage-8
-  Stage-5 depends on stages: Stage-8
-  Stage-2 depends on stages: Stage-5, Stage-6
+  Stage-3 is a root stage
+  Stage-8 depends on stages: Stage-3 , consists of Stage-10, Stage-1
+  Stage-10
+  Stage-7 depends on stages: Stage-10
+  Stage-1 depends on stages: Stage-7
+  Stage-6 depends on stages: Stage-1 , consists of Stage-9, Stage-2
   Stage-9
-  Stage-6 depends on stages: Stage-9
+  Stage-5 depends on stages: Stage-9
+  Stage-2 depends on stages: Stage-5
   Stage-0 depends on stages: Stage-2
 
 STAGE PLANS:
-  Stage: Stage-1
+  Stage: Stage-3
     Map Reduce
       Map Operator Tree:
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key < 80) and (key < 100)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 100.0) and (UDFToDouble(key) < 80.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: string)
-                outputColumnNames: _col0
-                Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
-          TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-            Filter Operator
-              predicate: (((key < 100) and (key < 80)) and key is not null) (type: boolean)
-              Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
-              Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key < 100) and (key < 80)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 100.0) and (UDFToDouble(key) < 80.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -980,19 +989,16 @@ STAGE PLANS:
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 0 to 2
           handleSkewJoin: true
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-            2 _col0 (type: string)
-          outputColumnNames: _col0, _col3
-          Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE Column stats: NONE
-          Group By Operator
-            aggregations: sum(hash(_col0)), sum(hash(_col3))
-            mode: hash
-            outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+          outputColumnNames: _col1, _col2
+          Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column stats: NONE
+          Select Operator
+            expressions: _col2 (type: string), _col1 (type: string)
+            outputColumnNames: _col0, _col2
+            Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               table:
@@ -1000,18 +1006,15 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                   serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
-  Stage: Stage-7
+  Stage: Stage-8
     Conditional Operator
 
-  Stage: Stage-8
+  Stage: Stage-10
     Map Reduce Local Work
       Alias -> Map Local Tables:
         1 
           Fetch Operator
             limit: -1
-        2 
-          Fetch Operator
-            limit: -1
       Alias -> Map Local Operator Tree:
         1 
           TableScan
@@ -1019,32 +1022,21 @@ STAGE PLANS:
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
-        2 
-          TableScan
-            HashTable Sink Operator
-              keys:
-                0 reducesinkkey0 (type: string)
-                1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
 
-  Stage: Stage-5
+  Stage: Stage-7
     Map Reduce
       Map Operator Tree:
           TableScan
             Map Join Operator
               condition map:
                    Inner Join 0 to 1
-                   Inner Join 0 to 2
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
-              outputColumnNames: _col0, _col3
-              Group By Operator
-                aggregations: sum(hash(_col0)), sum(hash(_col3))
-                mode: hash
-                outputColumnNames: _col0, _col1
+              outputColumnNames: _col1, _col2
+              Select Operator
+                expressions: _col2 (type: string), _col1 (type: string)
+                outputColumnNames: _col0, _col2
                 File Output Operator
                   compressed: false
                   table:
@@ -1054,83 +1046,127 @@ STAGE PLANS:
       Local Work:
         Map Reduce Local Work
 
-  Stage: Stage-2
+  Stage: Stage-1
     Map Reduce
       Map Operator Tree:
           TableScan
+            alias: src
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+            Filter Operator
+              predicate: (((UDFToDouble(key) < 80.0) and (UDFToDouble(key) < 100.0)) and key is not null) (type: boolean)
+              Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
+                Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 28 Data size: 297 Basic stats: COMPLETE Column stats: NONE
+          TableScan
             Reduce Output Operator
-              sort order: 
-              Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
-              value expressions: _col0 (type: bigint), _col1 (type: bigint)
+              key expressions: _col0 (type: string)
+              sort order: +
+              Map-reduce partition columns: _col0 (type: string)
+              Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column stats: NONE
+              value expressions: _col2 (type: string)
       Reduce Operator Tree:
-        Group By Operator
-          aggregations: sum(VALUE._col0), sum(VALUE._col1)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+        Join Operator
+          condition map:
+               Inner Join 0 to 1
+          handleSkewJoin: true
+          keys:
+            0 _col0 (type: string)
+            1 _col0 (type: string)
+          outputColumnNames: _col1, _col3
+          Statistics: Num rows: 66 Data size: 706 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: bigint), _col1 (type: bigint)
+            expressions: hash(_col1) (type: int), hash(_col3) (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
-            File Output Operator
-              compressed: false
+            Statistics: Num rows: 66 Data size: 706 Basic stats: COMPLETE Column stats: NONE
+            Group By Operator
+              aggregations: sum(_col0), sum(_col1)
+              mode: hash
+              outputColumnNames: _col0, _col1
               Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
-              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
+              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
+
+  Stage: Stage-6
+    Conditional Operator
 
   Stage: Stage-9
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        0 
-          Fetch Operator
-            limit: -1
-        2 
+        1 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        0 
-          TableScan
-            HashTable Sink Operator
-              keys:
-                0 reducesinkkey0 (type: string)
-                1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
-        2 
+        1 
           TableScan
             HashTable Sink Operator
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
 
-  Stage: Stage-6
+  Stage: Stage-5
     Map Reduce
       Map Operator Tree:
           TableScan
             Map Join Operator
               condition map:
                    Inner Join 0 to 1
-                   Inner Join 0 to 2
               keys:
                 0 reducesinkkey0 (type: string)
                 1 reducesinkkey0 (type: string)
-                2 reducesinkkey0 (type: string)
-              outputColumnNames: _col0, _col3
-              Group By Operator
-                aggregations: sum(hash(_col0)), sum(hash(_col3))
-                mode: hash
+              outputColumnNames: _col1, _col3
+              Select Operator
+                expressions: hash(_col1) (type: int), hash(_col3) (type: int)
                 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
+                Group By Operator
+                  aggregations: sum(_col0), sum(_col1)
+                  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
       Local Work:
         Map Reduce Local Work
 
+  Stage: Stage-2
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Reduce Output Operator
+              sort order: 
+              Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+              value expressions: _col0 (type: bigint), _col1 (type: bigint)
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0), sum(VALUE._col1)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+          Select Operator
+            expressions: _col0 (type: bigint), _col1 (type: bigint)
+            outputColumnNames: _col0, _col1
+            Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+              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
+
   Stage: Stage-0
     Fetch Operator
       limit: -1

Modified: hive/trunk/ql/src/test/results/clientpositive/skewjoin_noskew.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/skewjoin_noskew.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/skewjoin_noskew.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/skewjoin_noskew.q.out Tue Dec 16 01:13:24 2014
@@ -24,31 +24,39 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                value expressions: value (type: string)
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
-            alias: b
+            alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           handleSkewJoin: true
           keys:
-            0 key (type: string)
-            1 key (type: string)
+            0 _col0 (type: string)
+            1 _col0 (type: string)
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
           File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/stats1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/stats1.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/stats1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/stats1.q.out Tue Dec 16 01:13:24 2014
@@ -34,9 +34,11 @@ STAGE PLANS:
             alias: s1
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
             Select Operator
+              expressions: 1 (type: int)
+              outputColumnNames: _col0
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
               Group By Operator
-                aggregations: count(1)
+                aggregations: count(_col0)
                 mode: hash
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -125,7 +127,7 @@ POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 POSTHOOK: Output: default@tmptable
 POSTHOOK: Lineage: tmptable.key EXPRESSION [(src1)s2.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: tmptable.value EXPRESSION [(src)s1.null, (src1)s2.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: tmptable.value EXPRESSION [(src1)s2.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: SELECT * FROM tmptable x SORT BY x.key, x.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tmptable

Modified: hive/trunk/ql/src/test/results/clientpositive/stats_only_null.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/stats_only_null.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/stats_only_null.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/stats_only_null.q.out Tue Dec 16 01:13:24 2014
@@ -85,10 +85,10 @@ STAGE PLANS:
             Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: a (type: double), b (type: int), c (type: string), d (type: smallint)
-              outputColumnNames: a, b, c, d
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
-                aggregations: count(), count(a), count(b), count(c), count(d)
+                aggregations: count(), count(_col0), count(_col1), count(_col2), count(_col3)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 40 Basic stats: COMPLETE Column stats: NONE
@@ -139,10 +139,10 @@ STAGE PLANS:
             Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: a (type: double), b (type: int), c (type: string), d (type: smallint)
-              outputColumnNames: a, b, c, d
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
-                aggregations: count(), count(a), count(b), count(c), count(d)
+                aggregations: count(), count(_col0), count(_col1), count(_col2), count(_col3)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1 Data size: 40 Basic stats: COMPLETE Column stats: NONE

Modified: hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/str_to_map.q.out Tue Dec 16 01:13:24 2014
@@ -62,10 +62,10 @@ STAGE PLANS:
           Select Operator
             expressions: str_to_map('a:1,b:2,c:3') (type: map<string,string>)
             outputColumnNames: _col0
-            Statistics: Num rows: 500 Data size: 377000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
             Limit
               Number of rows: 3
-              Statistics: Num rows: 3 Data size: 2262 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
               ListSink
 
 PREHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3
@@ -97,10 +97,10 @@ STAGE PLANS:
           Select Operator
             expressions: str_to_map('a:1,b:2,c:3',',',':') (type: map<string,string>)
             outputColumnNames: _col0
-            Statistics: Num rows: 500 Data size: 377000 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 500 Data size: 460000 Basic stats: COMPLETE Column stats: COMPLETE
             Limit
               Number of rows: 3
-              Statistics: Num rows: 3 Data size: 2262 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 3 Data size: 2760 Basic stats: COMPLETE Column stats: COMPLETE
               ListSink
 
 PREHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3

Modified: hive/trunk/ql/src/test/results/clientpositive/subq.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subq.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subq.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subq.q.out Tue Dec 16 01:13:24 2014
@@ -27,7 +27,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key < 100) (type: boolean)
+              predicate: (UDFToDouble(key) < 100.0) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

Modified: hive/trunk/ql/src/test/results/clientpositive/subq2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subq2.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subq2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subq2.q.out Tue Dec 16 01:13:24 2014
@@ -20,20 +20,24 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key >= 90) (type: boolean)
+              predicate: (UDFToDouble(key) >= 90.0) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                aggregations: count(1)
-                keys: key (type: string)
-                mode: hash
+              Select Operator
+                expressions: key (type: string), 1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
+                Group By Operator
+                  aggregations: count(_col1)
+                  keys: _col0 (type: string)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
                   Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: bigint)
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col1 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0)

Modified: hive/trunk/ql/src/test/results/clientpositive/subq_where_serialization.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subq_where_serialization.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subq_where_serialization.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subq_where_serialization.q.out Tue Dec 16 01:13:24 2014
@@ -20,16 +20,20 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                keys: key (type: string)
-                mode: hash
+              Select Operator
+                expressions: key (type: string)
                 outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
+                Group By Operator
+                  keys: _col0 (type: string)
+                  mode: hash
+                  outputColumnNames: _col0
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string)
@@ -62,7 +66,7 @@ STAGE PLANS:
           TableScan
             HashTable Sink Operator
               keys:
-                0 key (type: string)
+                0 _col0 (type: string)
                 1 _col0 (type: string)
 
   Stage: Stage-3
@@ -72,22 +76,25 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate: key is not null (type: boolean)
-              Map Join Operator
-                condition map:
-                     Left Semi Join 0 to 1
-                keys:
-                  0 key (type: string)
-                  1 _col0 (type: string)
+              Select Operator
+                expressions: key (type: string)
                 outputColumnNames: _col0
-                Select Operator
-                  expressions: _col0 (type: string)
+                Map Join Operator
+                  condition map:
+                       Left Semi Join 0 to 1
+                  keys:
+                    0 _col0 (type: string)
+                    1 _col0 (type: string)
                   outputColumnNames: _col0
-                  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
+                  Select Operator
+                    expressions: _col0 (type: string)
+                    outputColumnNames: _col0
+                    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
       Local Work:
         Map Reduce Local Work
 
@@ -100,11 +107,15 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: string)
@@ -116,7 +127,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 key (type: string)
+            0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0
           Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_alias.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_alias.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_alias.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_alias.q.out Tue Dec 16 01:13:24 2014
@@ -27,7 +27,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key < 100) (type: boolean)
+              predicate: (UDFToDouble(key) < 100.0) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_exists.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_exists.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_exists.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_exists.q.out Tue Dec 16 01:13:24 2014
@@ -36,23 +36,27 @@ STAGE PLANS:
             Filter Operator
               predicate: (value is not null and key is not null) (type: boolean)
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: value (type: string), key (type: string)
-                sort order: ++
-                Map-reduce partition columns: value (type: string), key (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col1 (type: string), _col0 (type: string)
+                  sort order: ++
+                  Map-reduce partition columns: _col1 (type: string), _col0 (type: string)
+                  Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((value > 'val_9') and key is not null) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: value (type: string), key (type: string)
-                outputColumnNames: _col1, _col2
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col1 (type: string), _col2 (type: string)
+                  keys: _col0 (type: string), _col1 (type: string)
                   mode: hash
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
@@ -66,7 +70,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 value (type: string), key (type: string)
+            0 _col1 (type: string), _col0 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 137 Data size: 1460 Basic stats: COMPLETE Column stats: NONE

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_exists_having.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_exists_having.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_exists_having.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_exists_having.q.out Tue Dec 16 01:13:24 2014
@@ -35,18 +35,22 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                aggregations: count()
-                keys: key (type: string)
-                mode: hash
-                outputColumnNames: _col0, _col1
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
+                Group By Operator
+                  aggregations: count()
+                  keys: _col0 (type: string)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: bigint)
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col1 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0)
@@ -72,17 +76,17 @@ STAGE PLANS:
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col1 (type: bigint)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((value > 'val_9') and key is not null) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
-                outputColumnNames: _col1
+                outputColumnNames: _col0
                 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col1 (type: string)
+                  keys: _col0 (type: string)
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
@@ -182,30 +186,34 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                aggregations: count()
-                keys: key (type: string)
-                mode: hash
-                outputColumnNames: _col0, _col1
+              Select Operator
+                expressions: key (type: string)
+                outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: string)
+                Group By Operator
+                  aggregations: count()
+                  keys: _col0 (type: string)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: bigint)
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: string)
+                    Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                    value expressions: _col1 (type: bigint)
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((value > 'val_9') and key is not null) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
-                outputColumnNames: _col1
+                outputColumnNames: _col0
                 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
-                  keys: _col1 (type: string)
+                  keys: _col0 (type: string)
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE

Modified: hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out?rev=1645808&r1=1645807&r2=1645808&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/subquery_in.q.out Tue Dec 16 01:13:24 2014
@@ -28,14 +28,18 @@ STAGE PLANS:
             Filter Operator
               predicate: key is not null (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string)
-                sort order: +
-                Map-reduce partition columns: key (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
-                value expressions: value (type: string)
+                Reduce Output Operator
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
-            alias: s1
+            alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (key > '9') (type: boolean)
@@ -59,7 +63,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 key (type: string)
+            0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
@@ -138,13 +142,17 @@ STAGE PLANS:
             Filter Operator
               predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string), value (type: string)
-                sort order: ++
-                Map-reduce partition columns: key (type: string), value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string), _col1 (type: string)
+                  sort order: ++
+                  Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
+                  Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((key > '9') and value is not null) (type: boolean)
@@ -168,7 +176,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 key (type: string), value (type: string)
+            0 _col0 (type: string), _col1 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 137 Data size: 1460 Basic stats: COMPLETE Column stats: NONE
@@ -254,12 +262,16 @@ STAGE PLANS:
           TableScan
             alias: part
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
-            Reduce Output Operator
-              key expressions: p_mfgr (type: string), p_size (type: int)
-              sort order: ++
-              Map-reduce partition columns: p_mfgr (type: string)
+            Select Operator
+              expressions: p_mfgr (type: string), p_size (type: int)
+              outputColumnNames: _col0, _col1
               Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
-              value expressions: p_mfgr (type: string), p_size (type: int)
+              Reduce Output Operator
+                key expressions: _col0 (type: string), _col1 (type: int)
+                sort order: ++
+                Map-reduce partition columns: _col0 (type: string)
+                Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
+                value expressions: _col0 (type: string), _col1 (type: int)
       Reduce Operator Tree:
         Extract
           Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
@@ -269,7 +281,7 @@ STAGE PLANS:
               predicate: (_wcol0 <= 2) (type: boolean)
               Statistics: Num rows: 8 Data size: 968 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col5 (type: int)
+                expressions: _col1 (type: int)
                 outputColumnNames: _col0
                 Statistics: Num rows: 8 Data size: 968 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
@@ -319,15 +331,19 @@ STAGE PLANS:
           TableScan
             alias: part
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
-            Filter Operator
-              predicate: UDFToDouble(p_size) is not null (type: boolean)
-              Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: UDFToDouble(p_size) (type: double)
-                sort order: +
-                Map-reduce partition columns: UDFToDouble(p_size) (type: double)
+            Select Operator
+              expressions: p_name (type: string), p_size (type: int), UDFToDouble(p_size) (type: double)
+              outputColumnNames: _col0, _col1, _col2
+              Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
+              Filter Operator
+                predicate: _col2 is not null (type: boolean)
                 Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE
-                value expressions: p_name (type: string), p_size (type: int)
+                Reduce Output Operator
+                  key expressions: _col2 (type: double)
+                  sort order: +
+                  Map-reduce partition columns: _col2 (type: double)
+                  Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col0 (type: string), _col1 (type: int)
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: double)
@@ -339,12 +355,12 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 UDFToDouble(p_size) (type: double)
+            0 _col2 (type: double)
             1 _col0 (type: double)
-          outputColumnNames: _col1, _col5
+          outputColumnNames: _col0, _col1
           Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col1 (type: string), _col5 (type: int)
+            expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -412,24 +428,28 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: part
+            alias: b
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
-            Reduce Output Operator
-              key expressions: p_mfgr (type: string), p_size (type: int)
-              sort order: ++
-              Map-reduce partition columns: p_mfgr (type: string)
+            Select Operator
+              expressions: p_mfgr (type: string), p_size (type: int)
+              outputColumnNames: _col0, _col1
               Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
-              value expressions: p_mfgr (type: string), p_size (type: int)
+              Reduce Output Operator
+                key expressions: _col0 (type: string), _col1 (type: int)
+                sort order: ++
+                Map-reduce partition columns: _col0 (type: string)
+                Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
+                value expressions: _col0 (type: string), _col1 (type: int)
       Reduce Operator Tree:
         Extract
           Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
           PTF Operator
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((_wcol0 <= 2) and _col2 is not null) (type: boolean)
+              predicate: ((_wcol0 <= 2) and _col0 is not null) (type: boolean)
               Statistics: Num rows: 4 Data size: 484 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col2 (type: string), _col5 (type: int)
+                expressions: _col0 (type: string), _col1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 4 Data size: 484 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
@@ -490,12 +510,16 @@ STAGE PLANS:
             Filter Operator
               predicate: (p_size is not null and p_mfgr is not null) (type: boolean)
               Statistics: Num rows: 7 Data size: 847 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: p_size (type: int), p_mfgr (type: string)
-                sort order: ++
-                Map-reduce partition columns: p_size (type: int), p_mfgr (type: string)
+              Select Operator
+                expressions: p_name (type: string), p_mfgr (type: string), p_size (type: int)
+                outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 7 Data size: 847 Basic stats: COMPLETE Column stats: NONE
-                value expressions: p_name (type: string)
+                Reduce Output Operator
+                  key expressions: _col2 (type: int), _col1 (type: string)
+                  sort order: ++
+                  Map-reduce partition columns: _col2 (type: int), _col1 (type: string)
+                  Statistics: Num rows: 7 Data size: 847 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col0 (type: string)
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: int), _col1 (type: string)
@@ -507,12 +531,12 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 p_size (type: int), p_mfgr (type: string)
+            0 _col2 (type: int), _col1 (type: string)
             1 _col0 (type: int), _col1 (type: string)
-          outputColumnNames: _col1, _col2, _col5
+          outputColumnNames: _col0, _col1, _col2
           Statistics: Num rows: 7 Data size: 931 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int)
+            expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int)
             outputColumnNames: _col0, _col1, _col2
             Statistics: Num rows: 7 Data size: 931 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -583,21 +607,25 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: a
+            alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: ((key > '9') and value is not null) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                keys: key (type: string), value (type: string)
-                mode: hash
+              Select Operator
+                expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string), _col1 (type: string)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
+                Group By Operator
+                  keys: _col0 (type: string), _col1 (type: string)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
                   Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: string), _col1 (type: string)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
+                    Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: string)
@@ -625,11 +653,15 @@ STAGE PLANS:
             Filter Operator
               predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: key (type: string), value (type: string)
-                sort order: ++
-                Map-reduce partition columns: key (type: string), value (type: string)
+              Select Operator
+                expressions: key (type: string), value (type: string)
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: string), _col1 (type: string)
+                  sort order: ++
+                  Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
+                  Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: string), _col1 (type: string)
@@ -641,7 +673,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 key (type: string), value (type: string)
+            0 _col0 (type: string), _col1 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 137 Data size: 1460 Basic stats: COMPLETE Column stats: NONE
@@ -732,9 +764,9 @@ where li.l_linenumber = 1 and
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
-  Stage-2 depends on stages: Stage-1
-  Stage-3 depends on stages: Stage-2
-  Stage-0 depends on stages: Stage-3
+  Stage-2 depends on stages: Stage-1, Stage-4
+  Stage-4 is a root stage
+  Stage-0 depends on stages: Stage-2
 
 STAGE PLANS:
   Stage: Stage-1
@@ -744,60 +776,46 @@ STAGE PLANS:
             alias: lineitem
             Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: l_partkey is not null (type: boolean)
-              Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
-              Group By Operator
-                keys: l_partkey (type: int)
-                mode: hash
-                outputColumnNames: _col0
-                Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((l_linenumber = 1) and l_orderkey is not null) and l_partkey is not null) (type: boolean)
+              Statistics: Num rows: 13 Data size: 1559 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 13 Data size: 1559 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
-      Reduce Operator Tree:
-        Group By Operator
-          keys: KEY._col0 (type: int)
-          mode: mergepartial
-          outputColumnNames: _col0
-          Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
-          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
-
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              key expressions: _col0 (type: int)
-              sort order: +
-              Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 13 Data size: 1559 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: int), _col2 (type: int)
           TableScan
-            alias: li
+            alias: lineitem
             Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean)
-              Statistics: Num rows: 12 Data size: 1439 Basic stats: COMPLETE Column stats: NONE
-              Reduce Output Operator
-                key expressions: l_partkey (type: int)
-                sort order: +
-                Map-reduce partition columns: l_partkey (type: int)
-                Statistics: Num rows: 12 Data size: 1439 Basic stats: COMPLETE Column stats: NONE
-                value expressions: l_orderkey (type: int), l_suppkey (type: int)
+              predicate: ((l_shipmode = 'AIR') and l_orderkey is not null) (type: boolean)
+              Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: l_orderkey (type: int)
+                outputColumnNames: _col0
+                Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  keys: _col0 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
-               Inner Join 0 to 1
+               Left Semi Join 0 to 1
           keys:
             0 _col0 (type: int)
-            1 l_partkey (type: int)
-          outputColumnNames: _col0, _col1, _col3
+            1 _col0 (type: int)
+          outputColumnNames: _col1, _col2
           Statistics: Num rows: 27 Data size: 3298 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
@@ -806,7 +824,7 @@ STAGE PLANS:
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                 serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
-  Stage: Stage-3
+  Stage: Stage-2
     Map Reduce
       Map Operator Tree:
           TableScan
@@ -815,38 +833,24 @@ STAGE PLANS:
               sort order: +
               Map-reduce partition columns: _col1 (type: int)
               Statistics: Num rows: 27 Data size: 3298 Basic stats: COMPLETE Column stats: NONE
-              value expressions: _col0 (type: int), _col3 (type: int)
+              value expressions: _col2 (type: int)
           TableScan
-            alias: lineitem
-            Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE
-            Filter Operator
-              predicate: ((l_shipmode = 'AIR') and l_orderkey is not null) (type: boolean)
+            Reduce Output Operator
+              key expressions: _col0 (type: int)
+              sort order: +
+              Map-reduce partition columns: _col0 (type: int)
               Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
-              Select Operator
-                expressions: l_orderkey (type: int)
-                outputColumnNames: _col0
-                Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
-                Group By Operator
-                  keys: _col0 (type: int)
-                  mode: hash
-                  outputColumnNames: _col0
-                  Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col0 (type: int)
-                    sort order: +
-                    Map-reduce partition columns: _col0 (type: int)
-                    Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
-               Left Semi Join 0 to 1
+               Inner Join 0 to 1
           keys:
             0 _col1 (type: int)
             1 _col0 (type: int)
-          outputColumnNames: _col0, _col3
+          outputColumnNames: _col1, _col2
           Statistics: Num rows: 29 Data size: 3627 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: int), _col3 (type: int)
+            expressions: _col1 (type: int), _col2 (type: int)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 29 Data size: 3627 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
@@ -857,6 +861,42 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
+  Stage: Stage-4
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: lineitem
+            Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE
+            Filter Operator
+              predicate: l_partkey is not null (type: boolean)
+              Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
+              Select Operator
+                expressions: l_partkey (type: int)
+                outputColumnNames: _col0
+                Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
+                Group By Operator
+                  keys: _col0 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE
+      Reduce Operator Tree:
+        Group By Operator
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE
+          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
+
   Stage: Stage-0
     Fetch Operator
       limit: -1