hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject [04/51] [partial] hive git commit: HIVE-20718: Add perf cli driver with constraints (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Mon, 22 Oct 2018 02:10:09 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
new file mode 100644
index 0000000..bcfe19e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
@@ -0,0 +1,220 @@
+PREHOOK: query: explain
+with customer_total_return as
+ (select cr_returning_customer_sk as ctr_customer_sk
+        ,ca_state as ctr_state, 
+ 	sum(cr_return_amt_inc_tax) as ctr_total_return
+ from catalog_returns
+     ,date_dim
+     ,customer_address
+ where cr_returned_date_sk = d_date_sk 
+   and d_year =1998
+   and cr_returning_addr_sk = ca_address_sk 
+ group by cr_returning_customer_sk
+         ,ca_state )
+  select  c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
+                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
+                  ,ca_location_type,ctr_total_return
+ from customer_total_return ctr1
+     ,customer_address
+     ,customer
+ where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
+ 			  from customer_total_return ctr2 
+                  	  where ctr1.ctr_state = ctr2.ctr_state)
+       and ca_address_sk = c_current_addr_sk
+       and ca_state = 'IL'
+       and ctr1.ctr_customer_sk = c_customer_sk
+ order by c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
+                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
+                  ,ca_location_type,ctr_total_return
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@catalog_returns
+PREHOOK: Input: default@customer
+PREHOOK: Input: default@customer_address
+PREHOOK: Input: default@date_dim
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+with customer_total_return as
+ (select cr_returning_customer_sk as ctr_customer_sk
+        ,ca_state as ctr_state, 
+ 	sum(cr_return_amt_inc_tax) as ctr_total_return
+ from catalog_returns
+     ,date_dim
+     ,customer_address
+ where cr_returned_date_sk = d_date_sk 
+   and d_year =1998
+   and cr_returning_addr_sk = ca_address_sk 
+ group by cr_returning_customer_sk
+         ,ca_state )
+  select  c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
+                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
+                  ,ca_location_type,ctr_total_return
+ from customer_total_return ctr1
+     ,customer_address
+     ,customer
+ where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
+ 			  from customer_total_return ctr2 
+                  	  where ctr1.ctr_state = ctr2.ctr_state)
+       and ca_address_sk = c_current_addr_sk
+       and ca_state = 'IL'
+       and ctr1.ctr_customer_sk = c_customer_sk
+ order by c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
+                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
+                  ,ca_location_type,ctr_total_return
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@catalog_returns
+POSTHOOK: Input: default@customer
+POSTHOOK: Input: default@customer_address
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 13 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 14 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 7 <- Map 14 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 15 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 4 vectorized
+      File Output Operator [FS_210]
+        Select Operator [SEL_209] (rows=100 width=1506)
+          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
+          Limit [LIM_208] (rows=100 width=1420)
+            Number of rows:100
+            Select Operator [SEL_207] (rows=1577696 width=1418)
+              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+            <-Reducer 3 [SIMPLE_EDGE]
+              SHUFFLE [RS_63]
+                Select Operator [SEL_62] (rows=1577696 width=1418)
+                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+                  Merge Join Operator [MERGEJOIN_178] (rows=1577696 width=1418)
+                    Conds:RS_59._col0=RS_60._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col19"]
+                  <-Reducer 10 [SIMPLE_EDGE]
+                    SHUFFLE [RS_60]
+                      PartitionCols:_col0
+                      Select Operator [SEL_55] (rows=1609248 width=227)
+                        Output:["_col0","_col2"]
+                        Filter Operator [FIL_54] (rows=1609248 width=227)
+                          predicate:(_col2 > _col3)
+                          Merge Join Operator [MERGEJOIN_177] (rows=4827746 width=227)
+                            Conds:RS_201._col1=RS_206._col1(Inner),Output:["_col0","_col2","_col3"]
+                          <-Reducer 13 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_206]
+                              PartitionCols:_col1
+                              Select Operator [SEL_205] (rows=12 width=198)
+                                Output:["_col0","_col1"]
+                                Group By Operator [GBY_204] (rows=12 width=206)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col0
+                                  Select Operator [SEL_203] (rows=5266632 width=201)
+                                    Output:["_col0","_col2"]
+                                    Group By Operator [GBY_202] (rows=5266632 width=201)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                                    <-Reducer 12 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_43]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_42] (rows=8749496 width=201)
+                                          Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col6, _col1
+                                          Merge Join Operator [MERGEJOIN_176] (rows=8749496 width=194)
+                                            Conds:RS_38._col2=RS_198._col0(Inner),Output:["_col1","_col3","_col6"]
+                                          <-Map 15 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_198]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_196] (rows=40000000 width=90)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_195] (rows=40000000 width=90)
+                                                  predicate:ca_state is not null
+                                                  TableScan [TS_12] (rows=40000000 width=90)
+                                                    default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_state"]
+                                          <-Reducer 11 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_38]
+                                              PartitionCols:_col2
+                                              Merge Join Operator [MERGEJOIN_175] (rows=8749496 width=112)
+                                                Conds:RS_190._col0=RS_194._col0(Inner),Output:["_col1","_col2","_col3"]
+                                              <-Map 14 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_194]
+                                                  PartitionCols:_col0
+                                                  Select Operator [SEL_192] (rows=652 width=4)
+                                                    Output:["_col0"]
+                                                    Filter Operator [FIL_191] (rows=652 width=8)
+                                                      predicate:(d_year = 1998)
+                                                      TableScan [TS_9] (rows=73049 width=8)
+                                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"]
+                                              <-Map 6 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_190]
+                                                  PartitionCols:_col0
+                                                  Select Operator [SEL_188] (rows=28221532 width=121)
+                                                    Output:["_col0","_col1","_col2","_col3"]
+                                                    Filter Operator [FIL_186] (rows=28221532 width=121)
+                                                      predicate:(cr_returned_date_sk is not null and cr_returning_addr_sk is not null)
+                                                      TableScan [TS_6] (rows=28798881 width=121)
+                                                        default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_returned_date_sk","cr_returning_customer_sk","cr_returning_addr_sk","cr_return_amt_inc_tax"]
+                          <-Reducer 9 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_201]
+                              PartitionCols:_col1
+                              Select Operator [SEL_200] (rows=4827746 width=201)
+                                Output:["_col0","_col1","_col2"]
+                                Group By Operator [GBY_199] (rows=4827746 width=201)
+                                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                                <-Reducer 8 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_23]
+                                    PartitionCols:_col0, _col1
+                                    Group By Operator [GBY_22] (rows=8574602 width=201)
+                                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col6, _col1
+                                      Merge Join Operator [MERGEJOIN_174] (rows=8574602 width=194)
+                                        Conds:RS_18._col2=RS_197._col0(Inner),Output:["_col1","_col3","_col6"]
+                                      <-Map 15 [SIMPLE_EDGE] vectorized
+                                        SHUFFLE [RS_197]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_196]
+                                      <-Reducer 7 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_18]
+                                          PartitionCols:_col2
+                                          Merge Join Operator [MERGEJOIN_173] (rows=8574602 width=112)
+                                            Conds:RS_189._col0=RS_193._col0(Inner),Output:["_col1","_col2","_col3"]
+                                          <-Map 14 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_193]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_192]
+                                          <-Map 6 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_189]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_187] (rows=27657410 width=121)
+                                                Output:["_col0","_col1","_col2","_col3"]
+                                                Filter Operator [FIL_185] (rows=27657410 width=121)
+                                                  predicate:(cr_returned_date_sk is not null and cr_returning_addr_sk is not null and cr_returning_customer_sk is not null)
+                                                   Please refer to the previous TableScan [TS_6]
+                  <-Reducer 2 [SIMPLE_EDGE]
+                    SHUFFLE [RS_59]
+                      PartitionCols:_col0
+                      Merge Join Operator [MERGEJOIN_172] (rows=1568628 width=1310)
+                        Conds:RS_181._col2=RS_184._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16"]
+                      <-Map 1 [SIMPLE_EDGE] vectorized
+                        SHUFFLE [RS_181]
+                          PartitionCols:_col2
+                          Select Operator [SEL_180] (rows=80000000 width=375)
+                            Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                            Filter Operator [FIL_179] (rows=80000000 width=375)
+                              predicate:c_current_addr_sk is not null
+                              TableScan [TS_0] (rows=80000000 width=375)
+                                default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_customer_id","c_current_addr_sk","c_salutation","c_first_name","c_last_name"]
+                      <-Map 5 [SIMPLE_EDGE] vectorized
+                        SHUFFLE [RS_184]
+                          PartitionCols:_col0
+                          Select Operator [SEL_183] (rows=784314 width=941)
+                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
+                            Filter Operator [FIL_182] (rows=784314 width=1027)
+                              predicate:(ca_state = 'IL')
+                              TableScan [TS_3] (rows=40000000 width=1027)
+                                default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_street_number","ca_street_name","ca_street_type","ca_suite_number","ca_city","ca_county","ca_state","ca_zip","ca_country","ca_gmt_offset","ca_location_type"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query82.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query82.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query82.q.out
new file mode 100644
index 0000000..1344b94
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query82.q.out
@@ -0,0 +1,146 @@
+PREHOOK: query: explain
+select  i_item_id
+       ,i_item_desc
+       ,i_current_price
+ from item, inventory, date_dim, store_sales
+ where i_current_price between 30 and 30+30
+ and inv_item_sk = i_item_sk
+ and d_date_sk=inv_date_sk
+ and d_date between cast('2002-05-30' as date) and (cast('2002-05-30' as date) +  60 days)
+ and i_manufact_id in (437,129,727,663)
+ and inv_quantity_on_hand between 100 and 500
+ and ss_item_sk = i_item_sk
+ group by i_item_id,i_item_desc,i_current_price
+ order by i_item_id
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@inventory
+PREHOOK: Input: default@item
+PREHOOK: Input: default@store_sales
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+select  i_item_id
+       ,i_item_desc
+       ,i_current_price
+ from item, inventory, date_dim, store_sales
+ where i_current_price between 30 and 30+30
+ and inv_item_sk = i_item_sk
+ and d_date_sk=inv_date_sk
+ and d_date between cast('2002-05-30' as date) and (cast('2002-05-30' as date) +  60 days)
+ and i_manufact_id in (437,129,727,663)
+ and inv_quantity_on_hand between 100 and 500
+ and ss_item_sk = i_item_sk
+ group by i_item_id,i_item_desc,i_current_price
+ order by i_item_id
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@inventory
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@store_sales
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Reducer 10 (BROADCAST_EDGE), Reducer 7 (BROADCAST_EDGE)
+Reducer 10 <- Reducer 9 (CUSTOM_SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (ONE_TO_ONE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 7 <- Map 6 (CUSTOM_SIMPLE_EDGE)
+Reducer 9 <- Map 11 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:100
+    Stage-1
+      Reducer 5 vectorized
+      File Output Operator [FS_102]
+        Limit [LIM_101] (rows=1 width=396)
+          Number of rows:100
+          Select Operator [SEL_100] (rows=1 width=396)
+            Output:["_col0","_col1","_col2"]
+          <-Reducer 4 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_99]
+              Group By Operator [GBY_98] (rows=1 width=396)
+                Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
+              <-Reducer 3 [SIMPLE_EDGE]
+                SHUFFLE [RS_23]
+                  PartitionCols:_col0, _col1, _col2
+                  Group By Operator [GBY_22] (rows=2 width=396)
+                    Output:["_col0","_col1","_col2"],keys:_col2, _col3, _col4
+                    Top N Key Operator [TNK_42] (rows=2871 width=396)
+                      keys:_col2, _col3, _col4,sort order:+++,top n:100
+                      Merge Join Operator [MERGEJOIN_78] (rows=2871 width=396)
+                        Conds:RS_18._col1=RS_19._col1(Inner),Output:["_col2","_col3","_col4"]
+                      <-Reducer 9 [SIMPLE_EDGE]
+                        SHUFFLE [RS_19]
+                          PartitionCols:_col1
+                          Merge Join Operator [MERGEJOIN_77] (rows=463969 width=4)
+                            Conds:RS_89._col0=RS_92._col0(Inner),Output:["_col1"]
+                          <-Map 11 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_92]
+                              PartitionCols:_col0
+                              Select Operator [SEL_91] (rows=8116 width=4)
+                                Output:["_col0"]
+                                Filter Operator [FIL_90] (rows=8116 width=98)
+                                  predicate:CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'2002-05-30 00:00:00' AND TIMESTAMP'2002-07-29 00:00:00'
+                                  TableScan [TS_8] (rows=73049 width=98)
+                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
+                          <-Map 8 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_89]
+                              PartitionCols:_col0
+                              Select Operator [SEL_88] (rows=4176000 width=8)
+                                Output:["_col0","_col1"]
+                                Filter Operator [FIL_87] (rows=4176000 width=11)
+                                  predicate:inv_quantity_on_hand BETWEEN 100 AND 500
+                                  TableScan [TS_5] (rows=37584000 width=11)
+                                    default@inventory,inventory,Tbl:COMPLETE,Col:COMPLETE,Output:["inv_date_sk","inv_item_sk","inv_quantity_on_hand"]
+                      <-Reducer 2 [ONE_TO_ONE_EDGE]
+                        FORWARD [RS_18]
+                          PartitionCols:_col1
+                          Merge Join Operator [MERGEJOIN_76] (rows=3564040 width=400)
+                            Conds:RS_97._col0=RS_81._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                          <-Map 6 [SIMPLE_EDGE] vectorized
+                            PARTITION_ONLY_SHUFFLE [RS_81]
+                              PartitionCols:_col0
+                              Select Operator [SEL_80] (rows=297 width=400)
+                                Output:["_col0","_col1","_col2","_col3"]
+                                Filter Operator [FIL_79] (rows=297 width=404)
+                                  predicate:((i_manufact_id) IN (437, 129, 727, 663) and i_current_price BETWEEN 30 AND 60)
+                                  TableScan [TS_2] (rows=462000 width=403)
+                                    default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id","i_item_desc","i_current_price","i_manufact_id"]
+                          <-Map 1 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_97]
+                              PartitionCols:_col0
+                              Select Operator [SEL_96] (rows=575995635 width=4)
+                                Output:["_col0"]
+                                Filter Operator [FIL_95] (rows=575995635 width=4)
+                                  predicate:((ss_item_sk BETWEEN DynamicValue(RS_16_item_i_item_sk_min) AND DynamicValue(RS_16_item_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_16_item_i_item_sk_bloom_filter))) and (ss_item_sk BETWEEN DynamicValue(RS_19_inventory_inv_item_sk_min) AND DynamicValue(RS_19_inventory_inv_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_19_inventory_inv_item_sk_bloom_filter))))
+                                  TableScan [TS_0] (rows=575995635 width=4)
+                                    default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk"]
+                                  <-Reducer 10 [BROADCAST_EDGE] vectorized
+                                    BROADCAST [RS_94]
+                                      Group By Operator [GBY_93] (rows=1 width=12)
+                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                      <-Reducer 9 [CUSTOM_SIMPLE_EDGE]
+                                        SHUFFLE [RS_50]
+                                          Group By Operator [GBY_49] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                            Select Operator [SEL_48] (rows=463969 width=8)
+                                              Output:["_col0"]
+                                               Please refer to the previous Merge Join Operator [MERGEJOIN_77]
+                                  <-Reducer 7 [BROADCAST_EDGE] vectorized
+                                    BROADCAST [RS_86]
+                                      Group By Operator [GBY_85] (rows=1 width=12)
+                                        Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                      <-Map 6 [CUSTOM_SIMPLE_EDGE] vectorized
+                                        PARTITION_ONLY_SHUFFLE [RS_84]
+                                          Group By Operator [GBY_83] (rows=1 width=12)
+                                            Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                            Select Operator [SEL_82] (rows=297 width=4)
+                                              Output:["_col0"]
+                                               Please refer to the previous Select Operator [SEL_80]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query83.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query83.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query83.q.out
new file mode 100644
index 0000000..4c9fc68
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query83.q.out
@@ -0,0 +1,338 @@
+PREHOOK: query: explain
+with sr_items as
+ (select i_item_id item_id,
+        sum(sr_return_quantity) sr_item_qty
+ from store_returns,
+      item,
+      date_dim
+ where sr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+	  where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   sr_returned_date_sk   = d_date_sk
+ group by i_item_id),
+ cr_items as
+ (select i_item_id item_id,
+        sum(cr_return_quantity) cr_item_qty
+ from catalog_returns,
+      item,
+      date_dim
+ where cr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+	  where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   cr_returned_date_sk   = d_date_sk
+ group by i_item_id),
+ wr_items as
+ (select i_item_id item_id,
+        sum(wr_return_quantity) wr_item_qty
+ from web_returns,
+      item,
+      date_dim
+ where wr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+		where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   wr_returned_date_sk   = d_date_sk
+ group by i_item_id)
+  select  sr_items.item_id
+       ,sr_item_qty
+       ,sr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 sr_dev
+       ,cr_item_qty
+       ,cr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 cr_dev
+       ,wr_item_qty
+       ,wr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 wr_dev
+       ,(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 average
+ from sr_items
+     ,cr_items
+     ,wr_items
+ where sr_items.item_id=cr_items.item_id
+   and sr_items.item_id=wr_items.item_id 
+ order by sr_items.item_id
+         ,sr_item_qty
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@catalog_returns
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@item
+PREHOOK: Input: default@store_returns
+PREHOOK: Input: default@web_returns
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+with sr_items as
+ (select i_item_id item_id,
+        sum(sr_return_quantity) sr_item_qty
+ from store_returns,
+      item,
+      date_dim
+ where sr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+	  where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   sr_returned_date_sk   = d_date_sk
+ group by i_item_id),
+ cr_items as
+ (select i_item_id item_id,
+        sum(cr_return_quantity) cr_item_qty
+ from catalog_returns,
+      item,
+      date_dim
+ where cr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+	  where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   cr_returned_date_sk   = d_date_sk
+ group by i_item_id),
+ wr_items as
+ (select i_item_id item_id,
+        sum(wr_return_quantity) wr_item_qty
+ from web_returns,
+      item,
+      date_dim
+ where wr_item_sk = i_item_sk
+ and   d_date    in 
+	(select d_date
+	from date_dim
+	where d_week_seq in 
+		(select d_week_seq
+		from date_dim
+		where d_date in ('1998-01-02','1998-10-15','1998-11-10')))
+ and   wr_returned_date_sk   = d_date_sk
+ group by i_item_id)
+  select  sr_items.item_id
+       ,sr_item_qty
+       ,sr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 sr_dev
+       ,cr_item_qty
+       ,cr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 cr_dev
+       ,wr_item_qty
+       ,wr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 wr_dev
+       ,(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 average
+ from sr_items
+     ,cr_items
+     ,wr_items
+ where sr_items.item_id=cr_items.item_id
+   and sr_items.item_id=wr_items.item_id 
+ order by sr_items.item_id
+         ,sr_item_qty
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@catalog_returns
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@store_returns
+POSTHOOK: Input: default@web_returns
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 16 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 22 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
+Reducer 16 <- Map 15 (SIMPLE_EDGE), Reducer 19 (ONE_TO_ONE_EDGE)
+Reducer 18 <- Map 17 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 16 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 11 (ONE_TO_ONE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
+Reducer 6 <- Reducer 14 (ONE_TO_ONE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 21 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:100
+    Stage-1
+      Reducer 7 vectorized
+      File Output Operator [FS_397]
+        Limit [LIM_396] (rows=100 width=260)
+          Number of rows:100
+          Select Operator [SEL_395] (rows=130021 width=260)
+            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_124]
+              Select Operator [SEL_123] (rows=130021 width=260)
+                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                Merge Join Operator [MERGEJOIN_360] (rows=130021 width=148)
+                  Conds:RS_120._col0=RS_394._col0(Inner),Output:["_col0","_col1","_col2","_col4","_col5","_col7","_col8"]
+                <-Reducer 14 [ONE_TO_ONE_EDGE] vectorized
+                  FORWARD [RS_394]
+                    PartitionCols:_col0
+                    Select Operator [SEL_393] (rows=130021 width=116)
+                      Output:["_col0","_col1","_col2"]
+                      Group By Operator [GBY_392] (rows=130021 width=108)
+                        Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                      <-Reducer 13 [SIMPLE_EDGE]
+                        SHUFFLE [RS_114]
+                          PartitionCols:_col0
+                          Group By Operator [GBY_113] (rows=390063 width=108)
+                            Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+                            Merge Join Operator [MERGEJOIN_358] (rows=5752600 width=103)
+                              Conds:RS_109._col0=RS_110._col0(Inner),Output:["_col2","_col4"]
+                            <-Reducer 16 [SIMPLE_EDGE]
+                              SHUFFLE [RS_110]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_349] (rows=5070 width=4)
+                                  Conds:RS_370._col1=RS_379._col0(Inner),Output:["_col0"]
+                                <-Map 15 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_370]
+                                    PartitionCols:_col1
+                                    Select Operator [SEL_369] (rows=73049 width=98)
+                                      Output:["_col0","_col1"]
+                                      Filter Operator [FIL_368] (rows=73049 width=98)
+                                        predicate:d_date is not null
+                                        TableScan [TS_5] (rows=73049 width=98)
+                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
+                                <-Reducer 19 [ONE_TO_ONE_EDGE] vectorized
+                                  FORWARD [RS_379]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_378] (rows=5070 width=94)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Reducer 18 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_21]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_20] (rows=5070 width=94)
+                                          Output:["_col0"],keys:_col0
+                                          Merge Join Operator [MERGEJOIN_348] (rows=10141 width=94)
+                                            Conds:RS_373._col1=RS_377._col0(Left Semi),Output:["_col0"]
+                                          <-Map 17 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_373]
+                                              PartitionCols:_col1
+                                              Select Operator [SEL_372] (rows=73049 width=98)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_371] (rows=73049 width=98)
+                                                  predicate:(d_date is not null and d_week_seq is not null)
+                                                  TableScan [TS_8] (rows=73049 width=98)
+                                                    default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date","d_week_seq"]
+                                          <-Map 20 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_377]
+                                              PartitionCols:_col0
+                                              Group By Operator [GBY_376] (rows=1826 width=4)
+                                                Output:["_col0"],keys:_col0
+                                                Select Operator [SEL_375] (rows=3652 width=4)
+                                                  Output:["_col0"]
+                                                  Filter Operator [FIL_374] (rows=3652 width=98)
+                                                    predicate:((d_date) IN ('1998-01-02', '1998-10-15', '1998-11-10') and d_week_seq is not null)
+                                                    TableScan [TS_11] (rows=73049 width=98)
+                                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date","d_week_seq"]
+                            <-Reducer 12 [SIMPLE_EDGE]
+                              SHUFFLE [RS_109]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_353] (rows=13749816 width=107)
+                                  Conds:RS_391._col1=RS_367._col0(Inner),Output:["_col0","_col2","_col4"]
+                                <-Map 8 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_367]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_364] (rows=462000 width=104)
+                                      Output:["_col0","_col1"]
+                                      TableScan [TS_3] (rows=462000 width=104)
+                                        default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"]
+                                <-Map 22 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_391]
+                                    PartitionCols:_col1
+                                    Select Operator [SEL_390] (rows=13749816 width=11)
+                                      Output:["_col0","_col1","_col2"]
+                                      Filter Operator [FIL_389] (rows=13749816 width=11)
+                                        predicate:wr_returned_date_sk is not null
+                                        TableScan [TS_78] (rows=14398467 width=11)
+                                          default@web_returns,web_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["wr_returned_date_sk","wr_item_sk","wr_return_quantity"]
+                <-Reducer 5 [ONE_TO_ONE_EDGE]
+                  FORWARD [RS_120]
+                    PartitionCols:_col0
+                    Merge Join Operator [MERGEJOIN_359] (rows=134905 width=132)
+                      Conds:RS_382._col0=RS_388._col0(Inner),Output:["_col0","_col1","_col2","_col4","_col5"]
+                    <-Reducer 11 [ONE_TO_ONE_EDGE] vectorized
+                      FORWARD [RS_388]
+                        PartitionCols:_col0
+                        Select Operator [SEL_387] (rows=141711 width=116)
+                          Output:["_col0","_col1","_col2"]
+                          Group By Operator [GBY_386] (rows=141711 width=108)
+                            Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                          <-Reducer 10 [SIMPLE_EDGE]
+                            SHUFFLE [RS_75]
+                              PartitionCols:_col0
+                              Group By Operator [GBY_74] (rows=462000 width=108)
+                                Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+                                Merge Join Operator [MERGEJOIN_357] (rows=25343167 width=103)
+                                  Conds:RS_70._col0=RS_71._col0(Inner),Output:["_col2","_col4"]
+                                <-Reducer 16 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_71]
+                                    PartitionCols:_col0
+                                     Please refer to the previous Merge Join Operator [MERGEJOIN_349]
+                                <-Reducer 9 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_70]
+                                    PartitionCols:_col0
+                                    Merge Join Operator [MERGEJOIN_350] (rows=55578005 width=107)
+                                      Conds:RS_385._col1=RS_366._col0(Inner),Output:["_col0","_col2","_col4"]
+                                    <-Map 8 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_366]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_364]
+                                    <-Map 21 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_385]
+                                        PartitionCols:_col1
+                                        Select Operator [SEL_384] (rows=55578005 width=11)
+                                          Output:["_col0","_col1","_col2"]
+                                          Filter Operator [FIL_383] (rows=55578005 width=11)
+                                            predicate:sr_returned_date_sk is not null
+                                            TableScan [TS_39] (rows=57591150 width=11)
+                                              default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_returned_date_sk","sr_item_sk","sr_return_quantity"]
+                    <-Reducer 4 [ONE_TO_ONE_EDGE] vectorized
+                      FORWARD [RS_382]
+                        PartitionCols:_col0
+                        Select Operator [SEL_381] (rows=134905 width=116)
+                          Output:["_col0","_col1","_col2"]
+                          Group By Operator [GBY_380] (rows=134905 width=108)
+                            Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                          <-Reducer 3 [SIMPLE_EDGE]
+                            SHUFFLE [RS_36]
+                              PartitionCols:_col0
+                              Group By Operator [GBY_35] (rows=462000 width=108)
+                                Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
+                                Merge Join Operator [MERGEJOIN_356] (rows=12501392 width=103)
+                                  Conds:RS_31._col0=RS_32._col0(Inner),Output:["_col2","_col4"]
+                                <-Reducer 16 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_32]
+                                    PartitionCols:_col0
+                                     Please refer to the previous Merge Join Operator [MERGEJOIN_349]
+                                <-Reducer 2 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_31]
+                                    PartitionCols:_col0
+                                    Merge Join Operator [MERGEJOIN_347] (rows=28798881 width=107)
+                                      Conds:RS_363._col1=RS_365._col0(Inner),Output:["_col0","_col2","_col4"]
+                                    <-Map 8 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_365]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_364]
+                                    <-Map 1 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_363]
+                                        PartitionCols:_col1
+                                        Select Operator [SEL_362] (rows=28798881 width=11)
+                                          Output:["_col0","_col1","_col2"]
+                                          Filter Operator [FIL_361] (rows=28798881 width=11)
+                                            predicate:cr_returned_date_sk is not null
+                                            TableScan [TS_0] (rows=28798881 width=11)
+                                              default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_returned_date_sk","cr_item_sk","cr_return_quantity"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
new file mode 100644
index 0000000..8feac3e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
@@ -0,0 +1,153 @@
+PREHOOK: query: explain
+select  c_customer_id as customer_id
+       ,c_last_name || ', ' || c_first_name as customername
+ from customer
+     ,customer_address
+     ,customer_demographics
+     ,household_demographics
+     ,income_band
+     ,store_returns
+ where ca_city	        =  'Hopewell'
+   and c_current_addr_sk = ca_address_sk
+   and ib_lower_bound   >=  32287
+   and ib_upper_bound   <=  32287 + 50000
+   and ib_income_band_sk = hd_income_band_sk
+   and cd_demo_sk = c_current_cdemo_sk
+   and hd_demo_sk = c_current_hdemo_sk
+   and sr_cdemo_sk = cd_demo_sk
+ order by c_customer_id
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@customer
+PREHOOK: Input: default@customer_address
+PREHOOK: Input: default@customer_demographics
+PREHOOK: Input: default@household_demographics
+PREHOOK: Input: default@income_band
+PREHOOK: Input: default@store_returns
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+select  c_customer_id as customer_id
+       ,c_last_name || ', ' || c_first_name as customername
+ from customer
+     ,customer_address
+     ,customer_demographics
+     ,household_demographics
+     ,income_band
+     ,store_returns
+ where ca_city	        =  'Hopewell'
+   and c_current_addr_sk = ca_address_sk
+   and ib_lower_bound   >=  32287
+   and ib_upper_bound   <=  32287 + 50000
+   and ib_income_band_sk = hd_income_band_sk
+   and cd_demo_sk = c_current_cdemo_sk
+   and hd_demo_sk = c_current_hdemo_sk
+   and sr_cdemo_sk = cd_demo_sk
+ order by c_customer_id
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@customer
+POSTHOOK: Input: default@customer_address
+POSTHOOK: Input: default@customer_demographics
+POSTHOOK: Input: default@household_demographics
+POSTHOOK: Input: default@income_band
+POSTHOOK: Input: default@store_returns
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (ONE_TO_ONE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 7 <- Map 6 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 11 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 4 vectorized
+      File Output Operator [FS_139]
+        Limit [LIM_138] (rows=100 width=384)
+          Number of rows:100
+          Select Operator [SEL_137] (rows=255285 width=384)
+            Output:["_col0","_col1"]
+          <-Reducer 3 [SIMPLE_EDGE]
+            SHUFFLE [RS_35]
+              Select Operator [SEL_34] (rows=255285 width=384)
+                Output:["_col1","_col2"]
+                Merge Join Operator [MERGEJOIN_119] (rows=255285 width=284)
+                  Conds:RS_31._col1=RS_32._col1(Inner),Output:["_col2","_col6"]
+                <-Reducer 2 [ONE_TO_ONE_EDGE]
+                  FORWARD [RS_31]
+                    PartitionCols:_col1
+                    Merge Join Operator [MERGEJOIN_115] (rows=56363634 width=4)
+                      Conds:RS_122._col0=RS_124._col0(Inner),Output:["_col1"]
+                    <-Map 1 [SIMPLE_EDGE] vectorized
+                      SHUFFLE [RS_122]
+                        PartitionCols:_col0
+                        Select Operator [SEL_121] (rows=55577698 width=3)
+                          Output:["_col0"]
+                          Filter Operator [FIL_120] (rows=55577698 width=3)
+                            predicate:sr_cdemo_sk is not null
+                            TableScan [TS_0] (rows=57591150 width=3)
+                              default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_cdemo_sk"]
+                    <-Map 5 [SIMPLE_EDGE] vectorized
+                      SHUFFLE [RS_124]
+                        PartitionCols:_col0
+                        Select Operator [SEL_123] (rows=1861800 width=4)
+                          Output:["_col0"]
+                          TableScan [TS_3] (rows=1861800 width=4)
+                            default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["cd_demo_sk"]
+                <-Reducer 8 [SIMPLE_EDGE]
+                  SHUFFLE [RS_32]
+                    PartitionCols:_col1
+                    Merge Join Operator [MERGEJOIN_118] (rows=8315 width=284)
+                      Conds:RS_24._col2=RS_25._col0(Inner),Output:["_col0","_col1","_col4"]
+                    <-Reducer 11 [SIMPLE_EDGE]
+                      SHUFFLE [RS_25]
+                        PartitionCols:_col0
+                        Merge Join Operator [MERGEJOIN_117] (rows=721 width=4)
+                          Conds:RS_133._col1=RS_136._col0(Inner),Output:["_col0"]
+                        <-Map 10 [SIMPLE_EDGE] vectorized
+                          SHUFFLE [RS_133]
+                            PartitionCols:_col1
+                            Select Operator [SEL_132] (rows=7200 width=8)
+                              Output:["_col0","_col1"]
+                              Filter Operator [FIL_131] (rows=7200 width=8)
+                                predicate:hd_income_band_sk is not null
+                                TableScan [TS_11] (rows=7200 width=8)
+                                  default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_income_band_sk"]
+                        <-Map 12 [SIMPLE_EDGE] vectorized
+                          SHUFFLE [RS_136]
+                            PartitionCols:_col0
+                            Select Operator [SEL_135] (rows=2 width=4)
+                              Output:["_col0"]
+                              Filter Operator [FIL_134] (rows=2 width=12)
+                                predicate:((ib_lower_bound >= 32287) and (ib_upper_bound <= 82287))
+                                TableScan [TS_14] (rows=20 width=12)
+                                  default@income_band,income_band,Tbl:COMPLETE,Col:COMPLETE,Output:["ib_income_band_sk","ib_lower_bound","ib_upper_bound"]
+                    <-Reducer 7 [SIMPLE_EDGE]
+                      SHUFFLE [RS_24]
+                        PartitionCols:_col2
+                        Merge Join Operator [MERGEJOIN_116] (rows=83148 width=284)
+                          Conds:RS_127._col3=RS_130._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
+                        <-Map 6 [SIMPLE_EDGE] vectorized
+                          SHUFFLE [RS_127]
+                            PartitionCols:_col3
+                            Select Operator [SEL_126] (rows=74500295 width=295)
+                              Output:["_col0","_col1","_col2","_col3","_col4"]
+                              Filter Operator [FIL_125] (rows=74500295 width=291)
+                                predicate:(c_current_addr_sk is not null and c_current_cdemo_sk is not null and c_current_hdemo_sk is not null)
+                                TableScan [TS_5] (rows=80000000 width=291)
+                                  default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_id","c_current_cdemo_sk","c_current_hdemo_sk","c_current_addr_sk","c_first_name","c_last_name"]
+                        <-Map 9 [SIMPLE_EDGE] vectorized
+                          SHUFFLE [RS_130]
+                            PartitionCols:_col0
+                            Select Operator [SEL_129] (rows=44643 width=4)
+                              Output:["_col0"]
+                              Filter Operator [FIL_128] (rows=44643 width=97)
+                                predicate:(ca_city = 'Hopewell')
+                                TableScan [TS_8] (rows=40000000 width=97)
+                                  default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_city"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out
new file mode 100644
index 0000000..ec5e4cf
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out
@@ -0,0 +1,320 @@
+PREHOOK: query: explain
+select  substr(r_reason_desc,1,20)
+       ,avg(ws_quantity)
+       ,avg(wr_refunded_cash)
+       ,avg(wr_fee)
+ from web_sales, web_returns, web_page, customer_demographics cd1,
+      customer_demographics cd2, customer_address, date_dim, reason 
+ where ws_web_page_sk = wp_web_page_sk
+   and ws_item_sk = wr_item_sk
+   and ws_order_number = wr_order_number
+   and ws_sold_date_sk = d_date_sk and d_year = 1998
+   and cd1.cd_demo_sk = wr_refunded_cdemo_sk 
+   and cd2.cd_demo_sk = wr_returning_cdemo_sk
+   and ca_address_sk = wr_refunded_addr_sk
+   and r_reason_sk = wr_reason_sk
+   and
+   (
+    (
+     cd1.cd_marital_status = 'M'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = '4 yr Degree'
+     and 
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 100.00 and 150.00
+    )
+   or
+    (
+     cd1.cd_marital_status = 'D'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = 'Primary' 
+     and
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 50.00 and 100.00
+    )
+   or
+    (
+     cd1.cd_marital_status = 'U'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = 'Advanced Degree'
+     and
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 150.00 and 200.00
+    )
+   )
+   and
+   (
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('KY', 'GA', 'NM')
+     and ws_net_profit between 100 and 200  
+    )
+    or
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('MT', 'OR', 'IN')
+     and ws_net_profit between 150 and 300  
+    )
+    or
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('WI', 'MO', 'WV')
+     and ws_net_profit between 50 and 250  
+    )
+   )
+group by r_reason_desc
+order by substr(r_reason_desc,1,20)
+        ,avg(ws_quantity)
+        ,avg(wr_refunded_cash)
+        ,avg(wr_fee)
+limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@customer_address
+PREHOOK: Input: default@customer_demographics
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@reason
+PREHOOK: Input: default@web_page
+PREHOOK: Input: default@web_returns
+PREHOOK: Input: default@web_sales
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+select  substr(r_reason_desc,1,20)
+       ,avg(ws_quantity)
+       ,avg(wr_refunded_cash)
+       ,avg(wr_fee)
+ from web_sales, web_returns, web_page, customer_demographics cd1,
+      customer_demographics cd2, customer_address, date_dim, reason 
+ where ws_web_page_sk = wp_web_page_sk
+   and ws_item_sk = wr_item_sk
+   and ws_order_number = wr_order_number
+   and ws_sold_date_sk = d_date_sk and d_year = 1998
+   and cd1.cd_demo_sk = wr_refunded_cdemo_sk 
+   and cd2.cd_demo_sk = wr_returning_cdemo_sk
+   and ca_address_sk = wr_refunded_addr_sk
+   and r_reason_sk = wr_reason_sk
+   and
+   (
+    (
+     cd1.cd_marital_status = 'M'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = '4 yr Degree'
+     and 
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 100.00 and 150.00
+    )
+   or
+    (
+     cd1.cd_marital_status = 'D'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = 'Primary' 
+     and
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 50.00 and 100.00
+    )
+   or
+    (
+     cd1.cd_marital_status = 'U'
+     and
+     cd1.cd_marital_status = cd2.cd_marital_status
+     and
+     cd1.cd_education_status = 'Advanced Degree'
+     and
+     cd1.cd_education_status = cd2.cd_education_status
+     and
+     ws_sales_price between 150.00 and 200.00
+    )
+   )
+   and
+   (
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('KY', 'GA', 'NM')
+     and ws_net_profit between 100 and 200  
+    )
+    or
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('MT', 'OR', 'IN')
+     and ws_net_profit between 150 and 300  
+    )
+    or
+    (
+     ca_country = 'United States'
+     and
+     ca_state in ('WI', 'MO', 'WV')
+     and ws_net_profit between 50 and 250  
+    )
+   )
+group by r_reason_desc
+order by substr(r_reason_desc,1,20)
+        ,avg(ws_quantity)
+        ,avg(wr_refunded_cash)
+        ,avg(wr_fee)
+limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@customer_address
+POSTHOOK: Input: default@customer_demographics
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@reason
+POSTHOOK: Input: default@web_page
+POSTHOOK: Input: default@web_returns
+POSTHOOK: Input: default@web_sales
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 10 <- Reducer 12 (BROADCAST_EDGE)
+Reducer 12 <- Map 11 (CUSTOM_SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 14 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 15 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 9 vectorized
+      File Output Operator [FS_209]
+        Limit [LIM_208] (rows=7 width=832)
+          Number of rows:100
+          Select Operator [SEL_207] (rows=7 width=832)
+            Output:["_col0","_col1","_col2","_col3"]
+          <-Reducer 8 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_206]
+              Select Operator [SEL_205] (rows=7 width=832)
+                Output:["_col4","_col5","_col6","_col7"]
+                Group By Operator [GBY_204] (rows=7 width=353)
+                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)","sum(VALUE._col2)","count(VALUE._col3)","sum(VALUE._col4)","count(VALUE._col5)"],keys:KEY._col0
+                <-Reducer 7 [SIMPLE_EDGE]
+                  SHUFFLE [RS_42]
+                    PartitionCols:_col0
+                    Group By Operator [GBY_41] (rows=7 width=353)
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col11)","count(_col11)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col23
+                      Select Operator [SEL_40] (rows=16740 width=136)
+                        Output:["_col6","_col7","_col11","_col23"]
+                        Filter Operator [FIL_39] (rows=16740 width=136)
+                          predicate:((_col31 and _col32 and _col15) or (_col33 and _col34 and _col16) or (_col35 and _col36 and _col17))
+                          Merge Join Operator [MERGEJOIN_179] (rows=44640 width=136)
+                            Conds:RS_36._col1, _col19, _col20=RS_197._col0, _col1, _col2(Inner),Output:["_col6","_col7","_col11","_col15","_col16","_col17","_col23","_col31","_col32","_col33","_col34","_col35","_col36"]
+                          <-Map 15 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_197]
+                              PartitionCols:_col0, _col1, _col2
+                              Select Operator [SEL_195] (rows=265971 width=207)
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+                                Filter Operator [FIL_194] (rows=265971 width=183)
+                                  predicate:((cd_education_status) IN ('4 yr Degree', 'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U'))
+                                  TableScan [TS_17] (rows=1861800 width=183)
+                                    default@customer_demographics,cd1,Tbl:COMPLETE,Col:COMPLETE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
+                          <-Reducer 6 [SIMPLE_EDGE]
+                            SHUFFLE [RS_36]
+                              PartitionCols:_col1, _col19, _col20
+                              Filter Operator [FIL_35] (rows=44640 width=315)
+                                predicate:((_col25 and _col12) or (_col26 and _col13) or (_col27 and _col14))
+                                Merge Join Operator [MERGEJOIN_178] (rows=59520 width=315)
+                                  Conds:RS_32._col2=RS_203._col0(Inner),Output:["_col1","_col6","_col7","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col19","_col20","_col23","_col25","_col26","_col27"]
+                                <-Map 14 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_203]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_202] (rows=3529412 width=16)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_201] (rows=3529412 width=187)
+                                        predicate:((ca_country = 'United States') and (ca_state) IN ('KY', 'GA', 'NM', 'MT', 'OR', 'IN', 'WI', 'MO', 'WV'))
+                                        TableScan [TS_14] (rows=40000000 width=187)
+                                          default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_state","ca_country"]
+                                <-Reducer 5 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_32]
+                                    PartitionCols:_col2
+                                    Merge Join Operator [MERGEJOIN_177] (rows=674551 width=350)
+                                      Conds:RS_29._col4=RS_200._col0(Inner),Output:["_col1","_col2","_col6","_col7","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col19","_col20","_col23"]
+                                    <-Map 13 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_200]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_199] (rows=72 width=101)
+                                          Output:["_col0","_col1"]
+                                          TableScan [TS_12] (rows=72 width=101)
+                                            default@reason,reason,Tbl:COMPLETE,Col:COMPLETE,Output:["r_reason_sk","r_reason_desc"]
+                                    <-Reducer 4 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_29]
+                                        PartitionCols:_col4
+                                        Merge Join Operator [MERGEJOIN_176] (rows=674551 width=254)
+                                          Conds:RS_26._col8=RS_185._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col19","_col20"]
+                                        <-Map 11 [SIMPLE_EDGE] vectorized
+                                          SHUFFLE [RS_185]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_184] (rows=652 width=4)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_183] (rows=652 width=8)
+                                                predicate:(d_year = 1998)
+                                                TableScan [TS_9] (rows=73049 width=8)
+                                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"]
+                                        <-Reducer 3 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_26]
+                                            PartitionCols:_col8
+                                            Merge Join Operator [MERGEJOIN_175] (rows=1889180 width=379)
+                                              Conds:RS_23._col3=RS_198._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col8","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col19","_col20"]
+                                            <-Map 15 [SIMPLE_EDGE] vectorized
+                                              SHUFFLE [RS_198]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_196] (rows=265971 width=183)
+                                                  Output:["_col0","_col1","_col2"]
+                                                   Please refer to the previous Filter Operator [FIL_194]
+                                            <-Reducer 2 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_23]
+                                                PartitionCols:_col3
+                                                Merge Join Operator [MERGEJOIN_174] (rows=13039884 width=262)
+                                                  Conds:RS_182._col0, _col5=RS_193._col1, _col2(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col11","_col12","_col13","_col14","_col15","_col16","_col17"]
+                                                <-Map 1 [SIMPLE_EDGE] vectorized
+                                                  SHUFFLE [RS_182]
+                                                    PartitionCols:_col0, _col5
+                                                    Select Operator [SEL_181] (rows=11975292 width=237)
+                                                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                                      Filter Operator [FIL_180] (rows=11975292 width=237)
+                                                        predicate:(wr_reason_sk is not null and wr_refunded_addr_sk is not null and wr_refunded_cdemo_sk is not null and wr_returning_cdemo_sk is not null)
+                                                        TableScan [TS_0] (rows=14398467 width=237)
+                                                          default@web_returns,web_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["wr_item_sk","wr_refunded_cdemo_sk","wr_refunded_addr_sk","wr_returning_cdemo_sk","wr_reason_sk","wr_order_number","wr_fee","wr_refunded_cash"]
+                                                <-Map 10 [SIMPLE_EDGE] vectorized
+                                                  SHUFFLE [RS_193]
+                                                    PartitionCols:_col1, _col2
+                                                    Select Operator [SEL_192] (rows=15992347 width=39)
+                                                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+                                                      Filter Operator [FIL_191] (rows=15992347 width=243)
+                                                        predicate:((ws_net_profit BETWEEN 100 AND 200 or ws_net_profit BETWEEN 150 AND 300 or ws_net_profit BETWEEN 50 AND 250) and (ws_sales_price BETWEEN 100 AND 150 or ws_sales_price BETWEEN 50 AND 100 or ws_sales_price BETWEEN 150 AND 200) and (ws_sold_date_sk BETWEEN DynamicValue(RS_27_date_dim_d_date_sk_min) AND DynamicValue(RS_27_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_27_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null and ws_web_page_sk is not null)
+                                                        TableScan [TS_3] (rows=144002668 width=243)
+                                                          default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_order_number","ws_quantity","ws_sales_price","ws_net_profit"]
+                                                        <-Reducer 12 [BROADCAST_EDGE] vectorized
+                                                          BROADCAST [RS_190]
+                                                            Group By Operator [GBY_189] (rows=1 width=12)
+                                                              Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                            <-Map 11 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                              SHUFFLE [RS_188]
+                                                                Group By Operator [GBY_187] (rows=1 width=12)
+                                                                  Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                                  Select Operator [SEL_186] (rows=652 width=4)
+                                                                    Output:["_col0"]
+                                                                     Please refer to the previous Select Operator [SEL_184]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/b8299551/ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out
new file mode 100644
index 0000000..638cce1
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out
@@ -0,0 +1,145 @@
+PREHOOK: query: explain
+select   
+    sum(ws_net_paid) as total_sum
+   ,i_category
+   ,i_class
+   ,grouping(i_category)+grouping(i_class) as lochierarchy
+   ,rank() over (
+ 	partition by grouping(i_category)+grouping(i_class),
+ 	case when grouping(i_class) = 0 then i_category end 
+ 	order by sum(ws_net_paid) desc) as rank_within_parent
+ from
+    web_sales
+   ,date_dim       d1
+   ,item
+ where
+    d1.d_month_seq between 1212 and 1212+11
+ and d1.d_date_sk = ws_sold_date_sk
+ and i_item_sk  = ws_item_sk
+ group by rollup(i_category,i_class)
+ order by
+   lochierarchy desc,
+   case when lochierarchy = 0 then i_category end,
+   rank_within_parent
+ limit 100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@item
+PREHOOK: Input: default@web_sales
+PREHOOK: Output: hdfs://### HDFS PATH ###
+POSTHOOK: query: explain
+select   
+    sum(ws_net_paid) as total_sum
+   ,i_category
+   ,i_class
+   ,grouping(i_category)+grouping(i_class) as lochierarchy
+   ,rank() over (
+ 	partition by grouping(i_category)+grouping(i_class),
+ 	case when grouping(i_class) = 0 then i_category end 
+ 	order by sum(ws_net_paid) desc) as rank_within_parent
+ from
+    web_sales
+   ,date_dim       d1
+   ,item
+ where
+    d1.d_month_seq between 1212 and 1212+11
+ and d1.d_date_sk = ws_sold_date_sk
+ and i_item_sk  = ws_item_sk
+ group by rollup(i_category,i_class)
+ order by
+   lochierarchy desc,
+   case when lochierarchy = 0 then i_category end,
+   rank_within_parent
+ limit 100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@web_sales
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Reducer 8 (BROADCAST_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 8 <- Map 7 (CUSTOM_SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 6 vectorized
+      File Output Operator [FS_82]
+        Limit [LIM_81] (rows=100 width=490)
+          Number of rows:100
+          Select Operator [SEL_80] (rows=3060 width=490)
+            Output:["_col0","_col1","_col2","_col3","_col4"]
+          <-Reducer 5 [SIMPLE_EDGE] vectorized
+            SHUFFLE [RS_79]
+              Select Operator [SEL_78] (rows=3060 width=490)
+                Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                PTF Operator [PTF_77] (rows=3060 width=302)
+                  Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}]
+                  Select Operator [SEL_76] (rows=3060 width=302)
+                    Output:["_col0","_col1","_col2","_col3"]
+                  <-Reducer 4 [SIMPLE_EDGE] vectorized
+                    SHUFFLE [RS_75]
+                      PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END
+                      Select Operator [SEL_74] (rows=3060 width=302)
+                        Output:["_col0","_col1","_col2","_col3"]
+                        Group By Operator [GBY_73] (rows=3060 width=302)
+                          Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
+                        <-Reducer 3 [SIMPLE_EDGE]
+                          SHUFFLE [RS_17]
+                            PartitionCols:_col0, _col1, _col2
+                            Group By Operator [GBY_16] (rows=88740 width=302)
+                              Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(_col2)"],keys:_col0, _col1, 0L
+                              Select Operator [SEL_14] (rows=24992810 width=293)
+                                Output:["_col0","_col1","_col2"]
+                                Merge Join Operator [MERGEJOIN_59] (rows=24992810 width=293)
+                                  Conds:RS_11._col1=RS_72._col0(Inner),Output:["_col2","_col5","_col6"]
+                                <-Map 9 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_72]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_71] (rows=462000 width=186)
+                                      Output:["_col0","_col1","_col2"]
+                                      TableScan [TS_6] (rows=462000 width=186)
+                                        default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_class","i_category"]
+                                <-Reducer 2 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_11]
+                                    PartitionCols:_col1
+                                    Merge Join Operator [MERGEJOIN_58] (rows=24992810 width=115)
+                                      Conds:RS_70._col0=RS_62._col0(Inner),Output:["_col1","_col2"]
+                                    <-Map 7 [SIMPLE_EDGE] vectorized
+                                      PARTITION_ONLY_SHUFFLE [RS_62]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_61] (rows=317 width=4)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_60] (rows=317 width=8)
+                                            predicate:d_month_seq BETWEEN 1212 AND 1223
+                                            TableScan [TS_3] (rows=73049 width=8)
+                                              default@date_dim,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_month_seq"]
+                                    <-Map 1 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_70]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_69] (rows=143966864 width=119)
+                                          Output:["_col0","_col1","_col2"]
+                                          Filter Operator [FIL_68] (rows=143966864 width=119)
+                                            predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_9_d1_d_date_sk_min) AND DynamicValue(RS_9_d1_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_9_d1_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null)
+                                            TableScan [TS_0] (rows=144002668 width=119)
+                                              default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_net_paid"]
+                                            <-Reducer 8 [BROADCAST_EDGE] vectorized
+                                              BROADCAST [RS_67]
+                                                Group By Operator [GBY_66] (rows=1 width=12)
+                                                  Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                                                <-Map 7 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                  PARTITION_ONLY_SHUFFLE [RS_65]
+                                                    Group By Operator [GBY_64] (rows=1 width=12)
+                                                      Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
+                                                      Select Operator [SEL_63] (rows=317 width=4)
+                                                        Output:["_col0"]
+                                                         Please refer to the previous Select Operator [SEL_61]
+


Mime
View raw message