You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by px...@apache.org on 2016/01/29 20:06:28 UTC

[26/33] hive git commit: HIVE-12709: further improve user level explain (Pengcheng Xiong, reviewed by Laljo John Pullokkaran)

http://git-wip-us.apache.org/repos/asf/hive/blob/be9735e1/ql/src/test/results/clientpositive/perf/query32.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query32.q.out b/ql/src/test/results/clientpositive/perf/query32.q.out
index ecc5834..dc085dd 100644
--- a/ql/src/test/results/clientpositive/perf/query32.q.out
+++ b/ql/src/test/results/clientpositive/perf/query32.q.out
@@ -46,160 +46,87 @@ Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
 Stage-0
-   Fetch Operator
-      limit:-1
-      Stage-1
-         Reducer 4
-         File Output Operator [FS_37]
-            compressed:false
-            Statistics:Num rows: 1 Data size: 112 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"}
-            Group By Operator [GBY_35]
-            |  aggregations:["sum(VALUE._col0)"]
-            |  outputColumnNames:["_col0"]
-            |  Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
-            |<-Reducer 3 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_34]
-                  sort order:
-                  Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
-                  value expressions:_col0 (type: decimal(17,2))
-                  Group By Operator [GBY_33]
-                     aggregations:["sum(_col1)"]
-                     outputColumnNames:["_col0"]
-                     Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
-                     Select Operator [SEL_32]
-                        outputColumnNames:["_col1"]
-                        Statistics:Num rows: 169400 Data size: 243305505 Basic stats: COMPLETE Column stats: NONE
-                        Filter Operator [FIL_31]
-                           predicate:(_col1 > CAST( _col5 AS decimal(20,15))) (type: boolean)
-                           Statistics:Num rows: 169400 Data size: 243305505 Basic stats: COMPLETE Column stats: NONE
-                           Merge Join Operator [MERGEJOIN_59]
-                           |  condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 1 to 2"}]
-                           |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
-                           |  outputColumnNames:["_col1","_col5"]
-                           |  Statistics:Num rows: 508200 Data size: 729916517 Basic stats: COMPLETE Column stats: NONE
-                           |<-Map 6 [SIMPLE_EDGE]
-                           |  Reduce Output Operator [RS_28]
-                           |     key expressions:_col0 (type: int)
-                           |     Map-reduce partition columns:_col0 (type: int)
-                           |     sort order:+
-                           |     Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
-                           |     Select Operator [SEL_12]
-                           |        outputColumnNames:["_col0"]
-                           |        Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
-                           |        Filter Operator [FIL_54]
-                           |           predicate:(i_item_sk is not null and (i_manufact_id = 436)) (type: boolean)
-                           |           Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
-                           |           TableScan [TS_10]
-                           |              alias:i
-                           |              Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                           |<-Reducer 2 [SIMPLE_EDGE]
-                           |  Reduce Output Operator [RS_27]
-                           |     key expressions:_col0 (type: int)
-                           |     Map-reduce partition columns:_col0 (type: int)
-                           |     sort order:+
-                           |     Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                           |     value expressions:_col1 (type: decimal(7,2))
-                           |     Select Operator [SEL_9]
-                           |        outputColumnNames:["_col0","_col1"]
-                           |        Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                           |        Merge Join Operator [MERGEJOIN_57]
-                           |        |  condition map:[{"":"Inner Join 0 to 1"}]
-                           |        |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
-                           |        |  outputColumnNames:["_col1","_col2"]
-                           |        |  Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                           |        |<-Map 1 [SIMPLE_EDGE]
-                           |        |  Reduce Output Operator [RS_6]
-                           |        |     key expressions:_col0 (type: int)
-                           |        |     Map-reduce partition columns:_col0 (type: int)
-                           |        |     sort order:+
-                           |        |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                           |        |     value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
-                           |        |     Select Operator [SEL_2]
-                           |        |        outputColumnNames:["_col0","_col1","_col2"]
-                           |        |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                           |        |        Filter Operator [FIL_52]
-                           |        |           predicate:(cs_sold_date_sk is not null and cs_item_sk is not null) (type: boolean)
-                           |        |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                           |        |           TableScan [TS_0]
-                           |        |              alias:cs
-                           |        |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                           |        |<-Map 5 [SIMPLE_EDGE]
-                           |           Reduce Output Operator [RS_7]
-                           |              key expressions:_col0 (type: int)
-                           |              Map-reduce partition columns:_col0 (type: int)
-                           |              sort order:+
-                           |              Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                           |              Select Operator [SEL_5]
-                           |                 outputColumnNames:["_col0"]
-                           |                 Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                           |                 Filter Operator [FIL_53]
-                           |                    predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27') (type: boolean)
-                           |                    Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                           |                    TableScan [TS_3]
-                           |                       alias:d
-                           |                       Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
-                           |<-Reducer 9 [SIMPLE_EDGE]
-                              Reduce Output Operator [RS_29]
-                                 key expressions:_col0 (type: int)
-                                 Map-reduce partition columns:_col0 (type: int)
-                                 sort order:+
-                                 Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
-                                 value expressions:_col1 (type: double)
-                                 Select Operator [SEL_26]
-                                    outputColumnNames:["_col0","_col1"]
-                                    Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
-                                    Group By Operator [GBY_25]
-                                    |  aggregations:["avg(VALUE._col0)"]
-                                    |  keys:KEY._col0 (type: int)
-                                    |  outputColumnNames:["_col0","_col1"]
-                                    |  Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
-                                    |<-Reducer 8 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_24]
-                                          key expressions:_col0 (type: int)
-                                          Map-reduce partition columns:_col0 (type: int)
-                                          sort order:+
-                                          Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                                          value expressions:_col1 (type: struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>)
-                                          Group By Operator [GBY_23]
-                                             aggregations:["avg(_col2)"]
-                                             keys:_col1 (type: int)
-                                             outputColumnNames:["_col0","_col1"]
-                                             Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                                             Merge Join Operator [MERGEJOIN_58]
-                                             |  condition map:[{"":"Inner Join 0 to 1"}]
-                                             |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
-                                             |  outputColumnNames:["_col1","_col2"]
-                                             |  Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                                             |<-Map 10 [SIMPLE_EDGE]
-                                             |  Reduce Output Operator [RS_20]
-                                             |     key expressions:_col0 (type: int)
-                                             |     Map-reduce partition columns:_col0 (type: int)
-                                             |     sort order:+
-                                             |     Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                             |     Select Operator [SEL_18]
-                                             |        outputColumnNames:["_col0"]
-                                             |        Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                             |        Filter Operator [FIL_56]
-                                             |           predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27') (type: boolean)
-                                             |           Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                             |           TableScan [TS_16]
-                                             |              alias:d
-                                             |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
-                                             |<-Map 7 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_19]
-                                                   key expressions:_col0 (type: int)
-                                                   Map-reduce partition columns:_col0 (type: int)
-                                                   sort order:+
-                                                   Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                   value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
-                                                   Select Operator [SEL_15]
-                                                      outputColumnNames:["_col0","_col1","_col2"]
-                                                      Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      Filter Operator [FIL_55]
-                                                         predicate:(cs_sold_date_sk is not null and cs_item_sk is not null) (type: boolean)
-                                                         Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                         TableScan [TS_13]
-                                                            alias:cs
-                                                            Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 4
+      File Output Operator [FS_37]
+        Group By Operator [GBY_35] (rows=1 width=112)
+          Output:["_col0"],aggregations:["sum(VALUE._col0)"]
+        <-Reducer 3 [SIMPLE_EDGE]
+          SHUFFLE [RS_34]
+            Group By Operator [GBY_33] (rows=1 width=112)
+              Output:["_col0"],aggregations:["sum(_col1)"]
+              Select Operator [SEL_32] (rows=169400 width=1436)
+                Output:["_col1"]
+                Filter Operator [FIL_31] (rows=169400 width=1436)
+                  predicate:(_col1 > CAST( _col5 AS decimal(20,15)))
+                  Merge Join Operator [MERGEJOIN_59] (rows=508200 width=1436)
+                    Conds:RS_27._col0=RS_28._col0(Inner),RS_28._col0=RS_29._col0(Inner),Output:["_col1","_col5"]
+                  <-Map 6 [SIMPLE_EDGE]
+                    SHUFFLE [RS_28]
+                      PartitionCols:_col0
+                      Select Operator [SEL_12] (rows=231000 width=1436)
+                        Output:["_col0"]
+                        Filter Operator [FIL_54] (rows=231000 width=1436)
+                          predicate:(i_item_sk is not null and (i_manufact_id = 436))
+                          TableScan [TS_10] (rows=462000 width=1436)
+                            default@item,i,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
+                  <-Reducer 2 [SIMPLE_EDGE]
+                    SHUFFLE [RS_27]
+                      PartitionCols:_col0
+                      Select Operator [SEL_9] (rows=40176 width=1119)
+                        Output:["_col0","_col1"]
+                        Merge Join Operator [MERGEJOIN_57] (rows=40176 width=1119)
+                          Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col1","_col2"]
+                        <-Map 1 [SIMPLE_EDGE]
+                          SHUFFLE [RS_6]
+                            PartitionCols:_col0
+                            Select Operator [SEL_2] (rows=1 width=0)
+                              Output:["_col0","_col1","_col2"]
+                              Filter Operator [FIL_52] (rows=1 width=0)
+                                predicate:(cs_sold_date_sk is not null and cs_item_sk is not null)
+                                TableScan [TS_0] (rows=1 width=0)
+                                  default@catalog_sales,cs,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_ext_discount_amt"]
+                        <-Map 5 [SIMPLE_EDGE]
+                          SHUFFLE [RS_7]
+                            PartitionCols:_col0
+                            Select Operator [SEL_5] (rows=36524 width=1119)
+                              Output:["_col0"]
+                              Filter Operator [FIL_53] (rows=36524 width=1119)
+                                predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27')
+                                TableScan [TS_3] (rows=73049 width=1119)
+                                  default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
+                  <-Reducer 9 [SIMPLE_EDGE]
+                    SHUFFLE [RS_29]
+                      PartitionCols:_col0
+                      Select Operator [SEL_26] (rows=20088 width=1119)
+                        Output:["_col0","_col1"]
+                        Group By Operator [GBY_25] (rows=20088 width=1119)
+                          Output:["_col0","_col1"],aggregations:["avg(VALUE._col0)"],keys:KEY._col0
+                        <-Reducer 8 [SIMPLE_EDGE]
+                          SHUFFLE [RS_24]
+                            PartitionCols:_col0
+                            Group By Operator [GBY_23] (rows=40176 width=1119)
+                              Output:["_col0","_col1"],aggregations:["avg(_col2)"],keys:_col1
+                              Merge Join Operator [MERGEJOIN_58] (rows=40176 width=1119)
+                                Conds:RS_19._col0=RS_20._col0(Inner),Output:["_col1","_col2"]
+                              <-Map 10 [SIMPLE_EDGE]
+                                SHUFFLE [RS_20]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_18] (rows=36524 width=1119)
+                                    Output:["_col0"]
+                                    Filter Operator [FIL_56] (rows=36524 width=1119)
+                                      predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27')
+                                      TableScan [TS_16] (rows=73049 width=1119)
+                                        default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
+                              <-Map 7 [SIMPLE_EDGE]
+                                SHUFFLE [RS_19]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_15] (rows=1 width=0)
+                                    Output:["_col0","_col1","_col2"]
+                                    Filter Operator [FIL_55] (rows=1 width=0)
+                                      predicate:(cs_sold_date_sk is not null and cs_item_sk is not null)
+                                      TableScan [TS_13] (rows=1 width=0)
+                                        default@catalog_sales,cs,Tbl:PARTIAL,Col:NONE,Output:["cs_sold_date_sk","cs_item_sk","cs_ext_discount_amt"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/be9735e1/ql/src/test/results/clientpositive/perf/query34.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query34.q.out b/ql/src/test/results/clientpositive/perf/query34.q.out
index 7976863..037bc76 100644
--- a/ql/src/test/results/clientpositive/perf/query34.q.out
+++ b/ql/src/test/results/clientpositive/perf/query34.q.out
@@ -13,165 +13,88 @@ Reducer 6 <- Map 11 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
 
 Stage-0
-   Fetch Operator
-      limit:-1
-      Stage-1
-         Reducer 7
-         File Output Operator [FS_37]
-            compressed:false
-            Statistics:Num rows: 88000001 Data size: 75681779077 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"}
-            Select Operator [SEL_36]
-            |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-            |  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
-            |<-Reducer 6 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_35]
-                  key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
-                  sort order:+++-
-                  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
-                  value expressions:_col4 (type: int), _col5 (type: bigint)
-                  Select Operator [SEL_34]
-                     outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                     Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
-                     Merge Join Operator [MERGEJOIN_60]
-                     |  condition map:[{"":"Inner Join 0 to 1"}]
-                     |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
-                     |  outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col7"]
-                     |  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
-                     |<-Map 11 [SIMPLE_EDGE]
-                     |  Reduce Output Operator [RS_32]
-                     |     key expressions:_col0 (type: int)
-                     |     Map-reduce partition columns:_col0 (type: int)
-                     |     sort order:+
-                     |     Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                     |     value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
-                     |     Select Operator [SEL_30]
-                     |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
-                     |        Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                     |        Filter Operator [FIL_56]
-                     |           predicate:c_customer_sk is not null (type: boolean)
-                     |           Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                     |           TableScan [TS_28]
-                     |              alias:customer
-                     |              Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                     |<-Reducer 5 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_31]
-                           key expressions:_col1 (type: int)
-                           Map-reduce partition columns:_col1 (type: int)
-                           sort order:+
-                           Statistics:Num rows: 12153 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
-                           value expressions:_col0 (type: int), _col2 (type: bigint)
-                           Filter Operator [FIL_26]
-                              predicate:_col2 BETWEEN 15 AND 20 (type: boolean)
-                              Statistics:Num rows: 12153 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
-                              Select Operator [SEL_25]
-                                 outputColumnNames:["_col0","_col1","_col2"]
-                                 Statistics:Num rows: 24306 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
-                                 Group By Operator [GBY_24]
-                                 |  aggregations:["count(VALUE._col0)"]
-                                 |  keys:KEY._col0 (type: int), KEY._col1 (type: int)
-                                 |  outputColumnNames:["_col0","_col1","_col2"]
-                                 |  Statistics:Num rows: 24306 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
-                                 |<-Reducer 4 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_23]
-                                       key expressions:_col0 (type: int), _col1 (type: int)
-                                       Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
-                                       sort order:++
-                                       Statistics:Num rows: 48612 Data size: 54398446 Basic stats: COMPLETE Column stats: NONE
-                                       value expressions:_col2 (type: bigint)
-                                       Group By Operator [GBY_22]
-                                          aggregations:["count()"]
-                                          keys:_col1 (type: int), _col4 (type: int)
-                                          outputColumnNames:["_col0","_col1","_col2"]
-                                          Statistics:Num rows: 48612 Data size: 54398446 Basic stats: COMPLETE Column stats: NONE
-                                          Merge Join Operator [MERGEJOIN_59]
-                                          |  condition map:[{"":"Inner Join 0 to 1"}]
-                                          |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
-                                          |  outputColumnNames:["_col1","_col4"]
-                                          |  Statistics:Num rows: 48612 Data size: 54398446 Basic stats: COMPLETE Column stats: NONE
-                                          |<-Map 10 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_19]
-                                          |     key expressions:_col0 (type: int)
-                                          |     Map-reduce partition columns:_col0 (type: int)
-                                          |     sort order:+
-                                          |     Statistics:Num rows: 800 Data size: 85600 Basic stats: COMPLETE Column stats: NONE
-                                          |     Select Operator [SEL_11]
-                                          |        outputColumnNames:["_col0"]
-                                          |        Statistics:Num rows: 800 Data size: 85600 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_55]
-                                          |           predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.2)) and hd_demo_sk is not null) (type: boolean)
-                                          |           Statistics:Num rows: 800 Data size: 85600 Basic stats: COMPLETE Column stats: NONE
-                                          |           TableScan [TS_9]
-                                          |              alias:household_demographics
-                                          |              Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
-                                          |<-Reducer 3 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_18]
-                                                key expressions:_col2 (type: int)
-                                                Map-reduce partition columns:_col2 (type: int)
-                                                sort order:+
-                                                Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
-                                                value expressions:_col1 (type: int), _col4 (type: int)
-                                                Merge Join Operator [MERGEJOIN_58]
-                                                |  condition map:[{"":"Inner Join 0 to 1"}]
-                                                |  keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
-                                                |  outputColumnNames:["_col1","_col2","_col4"]
-                                                |  Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
-                                                |<-Map 9 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator [RS_16]
-                                                |     key expressions:_col0 (type: int)
-                                                |     Map-reduce partition columns:_col0 (type: int)
-                                                |     sort order:+
-                                                |     Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                                |     Select Operator [SEL_8]
-                                                |        outputColumnNames:["_col0"]
-                                                |        Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                                |        Filter Operator [FIL_54]
-                                                |           predicate:((s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County', 'Orange County', 'Appanoose County', 'Franklin Parish', 'Tehama County') and s_store_sk is not null) (type: boolean)
-                                                |           Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                                |           TableScan [TS_6]
-                                                |              alias:store
-                                                |              Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
-                                                |<-Reducer 2 [SIMPLE_EDGE]
-                                                   Reduce Output Operator [RS_15]
-                                                      key expressions:_col3 (type: int)
-                                                      Map-reduce partition columns:_col3 (type: int)
-                                                      sort order:+
-                                                      Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                                                      value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int)
-                                                      Merge Join Operator [MERGEJOIN_57]
-                                                      |  condition map:[{"":"Inner Join 0 to 1"}]
-                                                      |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
-                                                      |  outputColumnNames:["_col1","_col2","_col3","_col4"]
-                                                      |  Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
-                                                      |<-Map 1 [SIMPLE_EDGE]
-                                                      |  Reduce Output Operator [RS_12]
-                                                      |     key expressions:_col0 (type: int)
-                                                      |     Map-reduce partition columns:_col0 (type: int)
-                                                      |     sort order:+
-                                                      |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |     value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
-                                                      |     Select Operator [SEL_2]
-                                                      |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
-                                                      |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |        Filter Operator [FIL_52]
-                                                      |           predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean)
-                                                      |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |           TableScan [TS_0]
-                                                      |              alias:store_sales
-                                                      |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |<-Map 8 [SIMPLE_EDGE]
-                                                         Reduce Output Operator [RS_13]
-                                                            key expressions:_col0 (type: int)
-                                                            Map-reduce partition columns:_col0 (type: int)
-                                                            sort order:+
-                                                            Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                                            Select Operator [SEL_5]
-                                                               outputColumnNames:["_col0"]
-                                                               Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                                               Filter Operator [FIL_53]
-                                                                  predicate:(((d_dom BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
-                                                                  Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                                                  TableScan [TS_3]
-                                                                     alias:date_dim
-                                                                     Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_37]
+        Select Operator [SEL_36] (rows=88000001 width=860)
+          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+        <-Reducer 6 [SIMPLE_EDGE]
+          SHUFFLE [RS_35]
+            Select Operator [SEL_34] (rows=88000001 width=860)
+              Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+              Merge Join Operator [MERGEJOIN_60] (rows=88000001 width=860)
+                Conds:RS_31._col1=RS_32._col0(Inner),Output:["_col0","_col2","_col4","_col5","_col6","_col7"]
+              <-Map 11 [SIMPLE_EDGE]
+                SHUFFLE [RS_32]
+                  PartitionCols:_col0
+                  Select Operator [SEL_30] (rows=80000000 width=860)
+                    Output:["_col0","_col1","_col2","_col3","_col4"]
+                    Filter Operator [FIL_56] (rows=80000000 width=860)
+                      predicate:c_customer_sk is not null
+                      TableScan [TS_28] (rows=80000000 width=860)
+                        default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_salutation","c_first_name","c_last_name","c_preferred_cust_flag"]
+              <-Reducer 5 [SIMPLE_EDGE]
+                SHUFFLE [RS_31]
+                  PartitionCols:_col1
+                  Filter Operator [FIL_26] (rows=12153 width=1119)
+                    predicate:_col2 BETWEEN 15 AND 20
+                    Select Operator [SEL_25] (rows=24306 width=1119)
+                      Output:["_col0","_col1","_col2"]
+                      Group By Operator [GBY_24] (rows=24306 width=1119)
+                        Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                      <-Reducer 4 [SIMPLE_EDGE]
+                        SHUFFLE [RS_23]
+                          PartitionCols:_col0, _col1
+                          Group By Operator [GBY_22] (rows=48612 width=1119)
+                            Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
+                            Merge Join Operator [MERGEJOIN_59] (rows=48612 width=1119)
+                              Conds:RS_18._col2=RS_19._col0(Inner),Output:["_col1","_col4"]
+                            <-Map 10 [SIMPLE_EDGE]
+                              SHUFFLE [RS_19]
+                                PartitionCols:_col0
+                                Select Operator [SEL_11] (rows=800 width=107)
+                                  Output:["_col0"]
+                                  Filter Operator [FIL_55] (rows=800 width=107)
+                                    predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.2)) and hd_demo_sk is not null)
+                                    TableScan [TS_9] (rows=7200 width=107)
+                                      default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential","hd_dep_count","hd_vehicle_count"]
+                            <-Reducer 3 [SIMPLE_EDGE]
+                              SHUFFLE [RS_18]
+                                PartitionCols:_col2
+                                Merge Join Operator [MERGEJOIN_58] (rows=44193 width=1119)
+                                  Conds:RS_15._col3=RS_16._col0(Inner),Output:["_col1","_col2","_col4"]
+                                <-Map 9 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_16]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_8] (rows=852 width=1910)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_54] (rows=852 width=1910)
+                                        predicate:((s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County', 'Orange County', 'Appanoose County', 'Franklin Parish', 'Tehama County') and s_store_sk is not null)
+                                        TableScan [TS_6] (rows=1704 width=1910)
+                                          default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_county"]
+                                <-Reducer 2 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_15]
+                                    PartitionCols:_col3
+                                    Merge Join Operator [MERGEJOIN_57] (rows=40176 width=1119)
+                                      Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                    <-Map 1 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_12]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_2] (rows=1 width=0)
+                                          Output:["_col0","_col1","_col2","_col3","_col4"]
+                                          Filter Operator [FIL_52] (rows=1 width=0)
+                                            predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null)
+                                            TableScan [TS_0] (rows=1 width=0)
+                                              default@store_sales,store_sales,Tbl:PARTIAL,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_store_sk","ss_ticket_number"]
+                                    <-Map 8 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_13]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_5] (rows=36524 width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_53] (rows=36524 width=1119)
+                                            predicate:(((d_dom BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null)
+                                            TableScan [TS_3] (rows=73049 width=1119)
+                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dom"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/be9735e1/ql/src/test/results/clientpositive/perf/query39.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query39.q.out b/ql/src/test/results/clientpositive/perf/query39.q.out
index 14e3dfc..7dcf01d 100644
--- a/ql/src/test/results/clientpositive/perf/query39.q.out
+++ b/ql/src/test/results/clientpositive/perf/query39.q.out
@@ -17,285 +17,151 @@ Reducer 6 <- Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
 
 Stage-0
-   Fetch Operator
-      limit:-1
-      Stage-1
-         Reducer 7
-         File Output Operator [FS_62]
-            compressed:false
-            Statistics:Num rows: 112735 Data size: 161919824 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"}
-            Select Operator [SEL_61]
-            |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
-            |  Statistics:Num rows: 112735 Data size: 161919824 Basic stats: COMPLETE Column stats: NONE
-            |<-Reducer 6 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_60]
-                  key expressions:_col0 (type: int), _col1 (type: int), 3 (type: int), _col3 (type: double), _col4 (type: double), 4 (type: int), _col8 (type: double), _col9 (type: double)
-                  sort order:++++++++
-                  Statistics:Num rows: 112735 Data size: 161919824 Basic stats: COMPLETE Column stats: NONE
-                  value expressions:_col5 (type: int), _col6 (type: int)
-                  Select Operator [SEL_59]
-                     outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col9"]
-                     Statistics:Num rows: 112735 Data size: 161919824 Basic stats: COMPLETE Column stats: NONE
-                     Merge Join Operator [MERGEJOIN_105]
-                     |  condition map:[{"":"Inner Join 0 to 1"}]
-                     |  keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col2 (type: int), _col1 (type: int)"}
-                     |  outputColumnNames:["_col1","_col2","_col4","_col5","_col7","_col8","_col10","_col11"]
-                     |  Statistics:Num rows: 112735 Data size: 161919824 Basic stats: COMPLETE Column stats: NONE
-                     |<-Reducer 15 [SIMPLE_EDGE]
-                     |  Reduce Output Operator [RS_57]
-                     |     key expressions:_col2 (type: int), _col1 (type: int)
-                     |     Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
-                     |     sort order:++
-                     |     Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                     |     value expressions:_col4 (type: double), _col5 (type: double)
-                     |     Select Operator [SEL_55]
-                     |        outputColumnNames:["_col1","_col2","_col4","_col5"]
-                     |        Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                     |        Filter Operator [FIL_54]
-                     |           predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean)
-                     |           Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                     |           Select Operator [SEL_97]
-                     |              outputColumnNames:["_col1","_col2","_col4","_col5"]
-                     |              Statistics:Num rows: 307461 Data size: 441599512 Basic stats: COMPLETE Column stats: NONE
-                     |              Group By Operator [GBY_53]
-                     |              |  aggregations:["avg(VALUE._col0)","stddev_samp(VALUE._col1)"]
-                     |              |  keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), 4 (type: int)
-                     |              |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                     |              |  Statistics:Num rows: 307461 Data size: 441599512 Basic stats: COMPLETE Column stats: NONE
-                     |              |<-Reducer 14 [SIMPLE_EDGE]
-                     |                 Reduce Output Operator [RS_52]
-                     |                    key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
-                     |                    Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
-                     |                    sort order:++++
-                     |                    Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                     |                    value expressions:_col4 (type: struct<count:bigint,sum:double,input:int>), _col5 (type: struct<count:bigint,sum:double,variance:double>)
-                     |                    Group By Operator [GBY_51]
-                     |                       aggregations:["avg(_col4)","stddev_samp(_col4)"]
-                     |                       keys:_col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
-                     |                       outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                     |                       Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                     |                       Select Operator [SEL_49]
-                     |                          outputColumnNames:["_col0","_col1","_col2","_col4"]
-                     |                          Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                     |                          Merge Join Operator [MERGEJOIN_104]
-                     |                          |  condition map:[{"":"Inner Join 0 to 1"}]
-                     |                          |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
-                     |                          |  outputColumnNames:["_col3","_col4","_col5","_col6"]
-                     |                          |  Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                     |                          |<-Map 18 [SIMPLE_EDGE]
-                     |                          |  Reduce Output Operator [RS_47]
-                     |                          |     key expressions:_col0 (type: int)
-                     |                          |     Map-reduce partition columns:_col0 (type: int)
-                     |                          |     sort order:+
-                     |                          |     Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                     |                          |     Select Operator [SEL_39]
-                     |                          |        outputColumnNames:["_col0"]
-                     |                          |        Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                     |                          |        Filter Operator [FIL_96]
-                     |                          |           predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) (type: boolean)
-                     |                          |           Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                     |                          |           TableScan [TS_37]
-                     |                          |              alias:date_dim
-                     |                          |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
-                     |                          |<-Reducer 13 [SIMPLE_EDGE]
-                     |                             Reduce Output Operator [RS_46]
-                     |                                key expressions:_col0 (type: int)
-                     |                                Map-reduce partition columns:_col0 (type: int)
-                     |                                sort order:+
-                     |                                Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE
-                     |                                value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: string)
-                     |                                Merge Join Operator [MERGEJOIN_103]
-                     |                                |  condition map:[{"":"Inner Join 0 to 1"}]
-                     |                                |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
-                     |                                |  outputColumnNames:["_col0","_col3","_col4","_col5","_col6"]
-                     |                                |  Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE
-                     |                                |<-Map 17 [SIMPLE_EDGE]
-                     |                                |  Reduce Output Operator [RS_44]
-                     |                                |     key expressions:_col0 (type: int)
-                     |                                |     Map-reduce partition columns:_col0 (type: int)
-                     |                                |     sort order:+
-                     |                                |     Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                     |                                |     value expressions:_col1 (type: string)
-                     |                                |     Select Operator [SEL_36]
-                     |                                |        outputColumnNames:["_col0","_col1"]
-                     |                                |        Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                     |                                |        Filter Operator [FIL_95]
-                     |                                |           predicate:w_warehouse_sk is not null (type: boolean)
-                     |                                |           Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                     |                                |           TableScan [TS_34]
-                     |                                |              alias:warehouse
-                     |                                |              Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                     |                                |<-Reducer 12 [SIMPLE_EDGE]
-                     |                                   Reduce Output Operator [RS_43]
-                     |                                      key expressions:_col2 (type: int)
-                     |                                      Map-reduce partition columns:_col2 (type: int)
-                     |                                      sort order:+
-                     |                                      Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
-                     |                                      value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: int)
-                     |                                      Merge Join Operator [MERGEJOIN_102]
-                     |                                      |  condition map:[{"":"Inner Join 0 to 1"}]
-                     |                                      |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
-                     |                                      |  outputColumnNames:["_col0","_col2","_col3","_col4"]
-                     |                                      |  Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
-                     |                                      |<-Map 11 [SIMPLE_EDGE]
-                     |                                      |  Reduce Output Operator [RS_40]
-                     |                                      |     key expressions:_col1 (type: int)
-                     |                                      |     Map-reduce partition columns:_col1 (type: int)
-                     |                                      |     sort order:+
-                     |                                      |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                     |                                      |     value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int)
-                     |                                      |     Select Operator [SEL_30]
-                     |                                      |        outputColumnNames:["_col0","_col1","_col2","_col3"]
-                     |                                      |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                     |                                      |        Filter Operator [FIL_93]
-                     |                                      |           predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean)
-                     |                                      |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                     |                                      |           TableScan [TS_28]
-                     |                                      |              alias:inventory
-                     |                                      |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                     |                                      |<-Map 16 [SIMPLE_EDGE]
-                     |                                         Reduce Output Operator [RS_41]
-                     |                                            key expressions:_col0 (type: int)
-                     |                                            Map-reduce partition columns:_col0 (type: int)
-                     |                                            sort order:+
-                     |                                            Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                     |                                            Select Operator [SEL_33]
-                     |                                               outputColumnNames:["_col0"]
-                     |                                               Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                     |                                               Filter Operator [FIL_94]
-                     |                                                  predicate:i_item_sk is not null (type: boolean)
-                     |                                                  Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                     |                                                  TableScan [TS_31]
-                     |                                                     alias:item
-                     |                                                     Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                     |<-Reducer 5 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_56]
-                           key expressions:_col2 (type: int), _col1 (type: int)
-                           Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
-                           sort order:++
-                           Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                           value expressions:_col4 (type: double), _col5 (type: double)
-                           Select Operator [SEL_27]
-                              outputColumnNames:["_col1","_col2","_col4","_col5"]
-                              Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                              Filter Operator [FIL_26]
-                                 predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean)
-                                 Statistics:Num rows: 102487 Data size: 147199837 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_98]
-                                    outputColumnNames:["_col1","_col2","_col4","_col5"]
-                                    Statistics:Num rows: 307461 Data size: 441599512 Basic stats: COMPLETE Column stats: NONE
-                                    Group By Operator [GBY_25]
-                                    |  aggregations:["avg(VALUE._col0)","stddev_samp(VALUE._col1)"]
-                                    |  keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), 3 (type: int)
-                                    |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                    |  Statistics:Num rows: 307461 Data size: 441599512 Basic stats: COMPLETE Column stats: NONE
-                                    |<-Reducer 4 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_24]
-                                          key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: int), 3 (type: int)
-                                          Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: int), 3 (type: int)
-                                          sort order:++++
-                                          Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                                          value expressions:_col4 (type: struct<count:bigint,sum:double,input:int>), _col5 (type: struct<count:bigint,sum:double,variance:double>)
-                                          Group By Operator [GBY_23]
-                                             aggregations:["avg(_col4)","stddev_samp(_col4)"]
-                                             keys:_col0 (type: string), _col1 (type: int), _col2 (type: int), 3 (type: int)
-                                             outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                             Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                                             Select Operator [SEL_21]
-                                                outputColumnNames:["_col0","_col1","_col2","_col4"]
-                                                Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                                                Merge Join Operator [MERGEJOIN_101]
-                                                |  condition map:[{"":"Inner Join 0 to 1"}]
-                                                |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
-                                                |  outputColumnNames:["_col3","_col4","_col5","_col6"]
-                                                |  Statistics:Num rows: 614922 Data size: 883199024 Basic stats: COMPLETE Column stats: NONE
-                                                |<-Map 10 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator [RS_19]
-                                                |     key expressions:_col0 (type: int)
-                                                |     Map-reduce partition columns:_col0 (type: int)
-                                                |     sort order:+
-                                                |     Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                |     Select Operator [SEL_11]
-                                                |        outputColumnNames:["_col0"]
-                                                |        Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                |        Filter Operator [FIL_92]
-                                                |           predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) (type: boolean)
-                                                |           Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                |           TableScan [TS_9]
-                                                |              alias:date_dim
-                                                |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
-                                                |<-Reducer 3 [SIMPLE_EDGE]
-                                                   Reduce Output Operator [RS_18]
-                                                      key expressions:_col0 (type: int)
-                                                      Map-reduce partition columns:_col0 (type: int)
-                                                      sort order:+
-                                                      Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE
-                                                      value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: string)
-                                                      Merge Join Operator [MERGEJOIN_100]
-                                                      |  condition map:[{"":"Inner Join 0 to 1"}]
-                                                      |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
-                                                      |  outputColumnNames:["_col0","_col3","_col4","_col5","_col6"]
-                                                      |  Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE
-                                                      |<-Map 9 [SIMPLE_EDGE]
-                                                      |  Reduce Output Operator [RS_16]
-                                                      |     key expressions:_col0 (type: int)
-                                                      |     Map-reduce partition columns:_col0 (type: int)
-                                                      |     sort order:+
-                                                      |     Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                                      |     value expressions:_col1 (type: string)
-                                                      |     Select Operator [SEL_8]
-                                                      |        outputColumnNames:["_col0","_col1"]
-                                                      |        Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                                      |        Filter Operator [FIL_91]
-                                                      |           predicate:w_warehouse_sk is not null (type: boolean)
-                                                      |           Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                                      |           TableScan [TS_6]
-                                                      |              alias:warehouse
-                                                      |              Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
-                                                      |<-Reducer 2 [SIMPLE_EDGE]
-                                                         Reduce Output Operator [RS_15]
-                                                            key expressions:_col2 (type: int)
-                                                            Map-reduce partition columns:_col2 (type: int)
-                                                            sort order:+
-                                                            Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
-                                                            value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: int)
-                                                            Merge Join Operator [MERGEJOIN_99]
-                                                            |  condition map:[{"":"Inner Join 0 to 1"}]
-                                                            |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
-                                                            |  outputColumnNames:["_col0","_col2","_col3","_col4"]
-                                                            |  Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
-                                                            |<-Map 1 [SIMPLE_EDGE]
-                                                            |  Reduce Output Operator [RS_12]
-                                                            |     key expressions:_col1 (type: int)
-                                                            |     Map-reduce partition columns:_col1 (type: int)
-                                                            |     sort order:+
-                                                            |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                            |     value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int)
-                                                            |     Select Operator [SEL_2]
-                                                            |        outputColumnNames:["_col0","_col1","_col2","_col3"]
-                                                            |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                            |        Filter Operator [FIL_89]
-                                                            |           predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean)
-                                                            |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                            |           TableScan [TS_0]
-                                                            |              alias:inventory
-                                                            |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                            |<-Map 8 [SIMPLE_EDGE]
-                                                               Reduce Output Operator [RS_13]
-                                                                  key expressions:_col0 (type: int)
-                                                                  Map-reduce partition columns:_col0 (type: int)
-                                                                  sort order:+
-                                                                  Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                                                  Select Operator [SEL_5]
-                                                                     outputColumnNames:["_col0"]
-                                                                     Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                                                     Filter Operator [FIL_90]
-                                                                        predicate:i_item_sk is not null (type: boolean)
-                                                                        Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                                                        TableScan [TS_3]
-                                                                           alias:item
-                                                                           Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_62]
+        Select Operator [SEL_61] (rows=112735 width=1436)
+          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+        <-Reducer 6 [SIMPLE_EDGE]
+          SHUFFLE [RS_60]
+            Select Operator [SEL_59] (rows=112735 width=1436)
+              Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col9"]
+              Merge Join Operator [MERGEJOIN_105] (rows=112735 width=1436)
+                Conds:RS_56._col2, _col1=RS_57._col2, _col1(Inner),Output:["_col1","_col2","_col4","_col5","_col7","_col8","_col10","_col11"]
+              <-Reducer 15 [SIMPLE_EDGE]
+                SHUFFLE [RS_57]
+                  PartitionCols:_col2, _col1
+                  Select Operator [SEL_55] (rows=102487 width=1436)
+                    Output:["_col1","_col2","_col4","_col5"]
+                    Filter Operator [FIL_54] (rows=102487 width=1436)
+                      predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0)
+                      Select Operator [SEL_97] (rows=307461 width=1436)
+                        Output:["_col1","_col2","_col4","_col5"]
+                        Group By Operator [GBY_53] (rows=307461 width=1436)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["avg(VALUE._col0)","stddev_samp(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, 4
+                        <-Reducer 14 [SIMPLE_EDGE]
+                          SHUFFLE [RS_52]
+                            PartitionCols:_col0, _col1, _col2, 4
+                            Group By Operator [GBY_51] (rows=614922 width=1436)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["avg(_col4)","stddev_samp(_col4)"],keys:_col0, _col1, _col2, 4
+                              Select Operator [SEL_49] (rows=614922 width=1436)
+                                Output:["_col0","_col1","_col2","_col4"]
+                                Merge Join Operator [MERGEJOIN_104] (rows=614922 width=1436)
+                                  Conds:RS_46._col0=RS_47._col0(Inner),Output:["_col3","_col4","_col5","_col6"]
+                                <-Map 18 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_47]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_39] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_96] (rows=18262 width=1119)
+                                        predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 4))
+                                        TableScan [TS_37] (rows=73049 width=1119)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                <-Reducer 13 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_46]
+                                    PartitionCols:_col0
+                                    Merge Join Operator [MERGEJOIN_103] (rows=559020 width=1436)
+                                      Conds:RS_43._col2=RS_44._col0(Inner),Output:["_col0","_col3","_col4","_col5","_col6"]
+                                    <-Map 17 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_44]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_36] (rows=27 width=1029)
+                                          Output:["_col0","_col1"]
+                                          Filter Operator [FIL_95] (rows=27 width=1029)
+                                            predicate:w_warehouse_sk is not null
+                                            TableScan [TS_34] (rows=27 width=1029)
+                                              default@warehouse,warehouse,Tbl:COMPLETE,Col:NONE,Output:["w_warehouse_sk","w_warehouse_name"]
+                                    <-Reducer 12 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_43]
+                                        PartitionCols:_col2
+                                        Merge Join Operator [MERGEJOIN_102] (rows=508200 width=1436)
+                                          Conds:RS_40._col1=RS_41._col0(Inner),Output:["_col0","_col2","_col3","_col4"]
+                                        <-Map 11 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_40]
+                                            PartitionCols:_col1
+                                            Select Operator [SEL_30] (rows=1 width=0)
+                                              Output:["_col0","_col1","_col2","_col3"]
+                                              Filter Operator [FIL_93] (rows=1 width=0)
+                                                predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null)
+                                                TableScan [TS_28] (rows=1 width=0)
+                                                  default@inventory,inventory,Tbl:PARTIAL,Col:NONE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
+                                        <-Map 16 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_41]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_33] (rows=462000 width=1436)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_94] (rows=462000 width=1436)
+                                                predicate:i_item_sk is not null
+                                                TableScan [TS_31] (rows=462000 width=1436)
+                                                  default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk"]
+              <-Reducer 5 [SIMPLE_EDGE]
+                SHUFFLE [RS_56]
+                  PartitionCols:_col2, _col1
+                  Select Operator [SEL_27] (rows=102487 width=1436)
+                    Output:["_col1","_col2","_col4","_col5"]
+                    Filter Operator [FIL_26] (rows=102487 width=1436)
+                      predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0)
+                      Select Operator [SEL_98] (rows=307461 width=1436)
+                        Output:["_col1","_col2","_col4","_col5"]
+                        Group By Operator [GBY_25] (rows=307461 width=1436)
+                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["avg(VALUE._col0)","stddev_samp(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, 3
+                        <-Reducer 4 [SIMPLE_EDGE]
+                          SHUFFLE [RS_24]
+                            PartitionCols:_col0, _col1, _col2, 3
+                            Group By Operator [GBY_23] (rows=614922 width=1436)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["avg(_col4)","stddev_samp(_col4)"],keys:_col0, _col1, _col2, 3
+                              Select Operator [SEL_21] (rows=614922 width=1436)
+                                Output:["_col0","_col1","_col2","_col4"]
+                                Merge Join Operator [MERGEJOIN_101] (rows=614922 width=1436)
+                                  Conds:RS_18._col0=RS_19._col0(Inner),Output:["_col3","_col4","_col5","_col6"]
+                                <-Map 10 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_19]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_11] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_92] (rows=18262 width=1119)
+                                        predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 3))
+                                        TableScan [TS_9] (rows=73049 width=1119)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                <-Reducer 3 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_18]
+                                    PartitionCols:_col0
+                                    Merge Join Operator [MERGEJOIN_100] (rows=559020 width=1436)
+                                      Conds:RS_15._col2=RS_16._col0(Inner),Output:["_col0","_col3","_col4","_col5","_col6"]
+                                    <-Map 9 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_16]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] (rows=27 width=1029)
+                                          Output:["_col0","_col1"]
+                                          Filter Operator [FIL_91] (rows=27 width=1029)
+                                            predicate:w_warehouse_sk is not null
+                                            TableScan [TS_6] (rows=27 width=1029)
+                                              default@warehouse,warehouse,Tbl:COMPLETE,Col:NONE,Output:["w_warehouse_sk","w_warehouse_name"]
+                                    <-Reducer 2 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_15]
+                                        PartitionCols:_col2
+                                        Merge Join Operator [MERGEJOIN_99] (rows=508200 width=1436)
+                                          Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col0","_col2","_col3","_col4"]
+                                        <-Map 1 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_12]
+                                            PartitionCols:_col1
+                                            Select Operator [SEL_2] (rows=1 width=0)
+                                              Output:["_col0","_col1","_col2","_col3"]
+                                              Filter Operator [FIL_89] (rows=1 width=0)
+                                                predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null)
+                                                TableScan [TS_0] (rows=1 width=0)
+                                                  default@inventory,inventory,Tbl:PARTIAL,Col:NONE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"]
+                                        <-Map 8 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_13]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_5] (rows=462000 width=1436)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_90] (rows=462000 width=1436)
+                                                predicate:i_item_sk is not null
+                                                TableScan [TS_3] (rows=462000 width=1436)
+                                                  default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk"]
 
 PREHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
 PREHOOK: type: QUERY