You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2018/08/06 05:47:47 UTC

[2/9] hive git commit: HIVE-19097 : related equals and in operators may cause inaccurate stats estimations (Zoltan Haindrich via Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/perf/tez/query85.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query85.q.out b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
index 4e42d69..bd6f45f 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
@@ -167,16 +167,16 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 11 <- Reducer 14 (BROADCAST_EDGE), Reducer 16 (BROADCAST_EDGE)
+Map 1 <- Reducer 12 (BROADCAST_EDGE), Reducer 17 (BROADCAST_EDGE)
 Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
-Reducer 14 <- Map 13 (CUSTOM_SIMPLE_EDGE)
-Reducer 16 <- Map 15 (CUSTOM_SIMPLE_EDGE)
+Reducer 12 <- Map 11 (CUSTOM_SIMPLE_EDGE)
+Reducer 17 <- Map 16 (CUSTOM_SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
-Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Map 15 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
-Reducer 6 <- Map 17 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
-Reducer 7 <- Map 18 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 13 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
 Reducer 8 <- Map 18 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
 
@@ -186,144 +186,144 @@ Stage-0
     Stage-1
       Reducer 10 vectorized
       File Output Operator [FS_244]
-        Limit [LIM_243] (rows=100 width=385)
+        Limit [LIM_243] (rows=100 width=1014)
           Number of rows:100
-          Select Operator [SEL_242] (rows=1023990 width=385)
+          Select Operator [SEL_242] (rows=4436665 width=1014)
             Output:["_col0","_col1","_col2","_col3"]
           <-Reducer 9 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_241]
-              Select Operator [SEL_240] (rows=1023990 width=385)
+              Select Operator [SEL_240] (rows=4436665 width=1014)
                 Output:["_col4","_col5","_col6","_col7"]
-                Group By Operator [GBY_239] (rows=1023990 width=385)
+                Group By Operator [GBY_239] (rows=4436665 width=1014)
                   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 8 [SIMPLE_EDGE]
                   SHUFFLE [RS_49]
                     PartitionCols:_col0
-                    Group By Operator [GBY_48] (rows=2047980 width=385)
-                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col12)","count(_col12)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col22
-                      Merge Join Operator [MERGEJOIN_206] (rows=2047980 width=385)
-                        Conds:RS_44._col3, _col24, _col25=RS_237._col0, _col1, _col2(Inner),Output:["_col6","_col7","_col12","_col22"]
+                    Group By Operator [GBY_48] (rows=8873331 width=1014)
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col4)","count(_col4)","sum(_col16)","count(_col16)","sum(_col15)","count(_col15)"],keys:_col28
+                      Merge Join Operator [MERGEJOIN_206] (rows=8873331 width=1014)
+                        Conds:RS_44._col13=RS_238._col0(Inner),Output:["_col4","_col15","_col16","_col28"]
                       <-Map 18 [SIMPLE_EDGE] vectorized
-                        SHUFFLE [RS_237]
-                          PartitionCols:_col0, _col1, _col2
-                          Select Operator [SEL_236] (rows=1861800 width=385)
-                            Output:["_col0","_col1","_col2"]
-                            Filter Operator [FIL_235] (rows=1861800 width=385)
-                              predicate:(((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U')) and cd_demo_sk is not null and cd_education_status is not null and cd_marital_status is not null)
-                              TableScan [TS_21] (rows=1861800 width=385)
-                                default@customer_demographics,cd2,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
+                        SHUFFLE [RS_238]
+                          PartitionCols:_col0
+                          Select Operator [SEL_237] (rows=72 width=200)
+                            Output:["_col0","_col1"]
+                            Filter Operator [FIL_236] (rows=72 width=200)
+                              predicate:r_reason_sk is not null
+                              TableScan [TS_21] (rows=72 width=200)
+                                default@reason,reason,Tbl:COMPLETE,Col:NONE,Output:["r_reason_sk","r_reason_desc"]
                       <-Reducer 7 [SIMPLE_EDGE]
                         SHUFFLE [RS_44]
-                          PartitionCols:_col3, _col24, _col25
-                          Filter Operator [FIL_43] (rows=393687 width=135)
-                            predicate:(((_col24 = 'D') and (_col25 = 'Primary') and _col13 BETWEEN 50 AND 100) or ((_col24 = 'M') and (_col25 = '4 yr Degree') and _col13 BETWEEN 100 AND 150) or ((_col24 = 'U') and (_col25 = 'Advanced Degree') and _col13 BETWEEN 150 AND 200))
-                            Merge Join Operator [MERGEJOIN_205] (rows=4724246 width=135)
-                              Conds:RS_40._col1=RS_238._col0(Inner),Output:["_col3","_col6","_col7","_col12","_col13","_col22","_col24","_col25"]
-                            <-Map 18 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_238]
-                                PartitionCols:_col0
-                                 Please refer to the previous Select Operator [SEL_236]
-                            <-Reducer 6 [SIMPLE_EDGE]
-                              SHUFFLE [RS_40]
-                                PartitionCols:_col1
-                                Merge Join Operator [MERGEJOIN_204] (rows=4294769 width=135)
-                                  Conds:RS_37._col4=RS_234._col0(Inner),Output:["_col1","_col3","_col6","_col7","_col12","_col13","_col22"]
-                                <-Map 17 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_234]
+                          PartitionCols:_col13
+                          Merge Join Operator [MERGEJOIN_205] (rows=8066665 width=1014)
+                            Conds:RS_41._col2=RS_217._col0(Inner),Output:["_col4","_col13","_col15","_col16"]
+                          <-Map 16 [SIMPLE_EDGE] vectorized
+                            SHUFFLE [RS_217]
+                              PartitionCols:_col0
+                              Select Operator [SEL_216] (rows=4602 width=585)
+                                Output:["_col0"]
+                                Filter Operator [FIL_215] (rows=4602 width=585)
+                                  predicate:wp_web_page_sk is not null
+                                  TableScan [TS_18] (rows=4602 width=585)
+                                    default@web_page,web_page,Tbl:COMPLETE,Col:NONE,Output:["wp_web_page_sk"]
+                          <-Reducer 6 [SIMPLE_EDGE]
+                            SHUFFLE [RS_41]
+                              PartitionCols:_col2
+                              Filter Operator [FIL_40] (rows=7333332 width=1014)
+                                predicate:((((_col24 = 'KY') or (_col24 = 'GA') or (_col24 = 'NM')) and _col6 BETWEEN 100 AND 200) or (((_col24 = 'MT') or (_col24 = 'OR') or (_col24 = 'IN')) and _col6 BETWEEN 150 AND 300) or (((_col24 = 'WI') or (_col24 = 'MO') or (_col24 = 'WV')) and _col6 BETWEEN 50 AND 250))
+                                Merge Join Operator [MERGEJOIN_204] (rows=22000000 width=1014)
+                                  Conds:RS_37._col11=RS_235._col0(Inner),Output:["_col2","_col4","_col6","_col13","_col15","_col16","_col24"]
+                                <-Map 15 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_235]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_233] (rows=72 width=200)
+                                    Select Operator [SEL_234] (rows=20000000 width=1014)
                                       Output:["_col0","_col1"]
-                                      Filter Operator [FIL_232] (rows=72 width=200)
-                                        predicate:r_reason_sk is not null
-                                        TableScan [TS_15] (rows=72 width=200)
-                                          default@reason,reason,Tbl:COMPLETE,Col:NONE,Output:["r_reason_sk","r_reason_desc"]
+                                      Filter Operator [FIL_233] (rows=20000000 width=1014)
+                                        predicate:((ca_country = 'United States') and ca_address_sk is not null)
+                                        TableScan [TS_15] (rows=40000000 width=1014)
+                                          default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state","ca_country"]
                                 <-Reducer 5 [SIMPLE_EDGE]
                                   SHUFFLE [RS_37]
-                                    PartitionCols:_col4
-                                    Merge Join Operator [MERGEJOIN_203] (rows=3904336 width=135)
-                                      Conds:RS_34._col8=RS_220._col0(Inner),Output:["_col1","_col3","_col4","_col6","_col7","_col12","_col13"]
-                                    <-Map 15 [SIMPLE_EDGE] vectorized
-                                      SHUFFLE [RS_220]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_219] (rows=36524 width=1119)
-                                          Output:["_col0"]
-                                          Filter Operator [FIL_218] (rows=36524 width=1119)
-                                            predicate:((d_year = 1998) and d_date_sk is not null)
-                                            TableScan [TS_12] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                                    PartitionCols:_col11
+                                    Merge Join Operator [MERGEJOIN_203] (rows=5856506 width=135)
+                                      Conds:RS_34._col12, _col18, _col19=RS_231._col0, _col1, _col2(Inner),Output:["_col2","_col4","_col6","_col11","_col13","_col15","_col16"]
+                                    <-Map 14 [SIMPLE_EDGE] vectorized
+                                      SHUFFLE [RS_231]
+                                        PartitionCols:_col0, _col1, _col2
+                                        Select Operator [SEL_230] (rows=1861800 width=385)
+                                          Output:["_col0","_col1","_col2"]
+                                          Filter Operator [FIL_229] (rows=1861800 width=385)
+                                            predicate:((cd_education_status) IN ('4 yr Degree', 'Primary', 'Advanced Degree') and (cd_marital_status) IN ('M', 'D', 'U') and cd_demo_sk is not null)
+                                            TableScan [TS_12] (rows=1861800 width=385)
+                                              default@customer_demographics,cd2,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
                                     <-Reducer 4 [SIMPLE_EDGE]
                                       SHUFFLE [RS_34]
-                                        PartitionCols:_col8
-                                        Merge Join Operator [MERGEJOIN_202] (rows=3549397 width=135)
-                                          Conds:RS_31._col10=RS_212._col0(Inner),Output:["_col1","_col3","_col4","_col6","_col7","_col8","_col12","_col13"]
-                                        <-Map 13 [SIMPLE_EDGE] vectorized
-                                          SHUFFLE [RS_212]
-                                            PartitionCols:_col0
-                                            Select Operator [SEL_211] (rows=4602 width=585)
-                                              Output:["_col0"]
-                                              Filter Operator [FIL_210] (rows=4602 width=585)
-                                                predicate:wp_web_page_sk is not null
-                                                TableScan [TS_9] (rows=4602 width=585)
-                                                  default@web_page,web_page,Tbl:COMPLETE,Col:NONE,Output:["wp_web_page_sk"]
-                                        <-Reducer 3 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_31]
-                                            PartitionCols:_col10
-                                            Filter Operator [FIL_30] (rows=3226725 width=135)
-                                              predicate:(((_col16) IN ('KY', 'GA', 'NM') and _col14 BETWEEN 100 AND 200) or ((_col16) IN ('MT', 'OR', 'IN') and _col14 BETWEEN 150 AND 300) or ((_col16) IN ('WI', 'MO', 'WV') and _col14 BETWEEN 50 AND 250))
-                                              Merge Join Operator [MERGEJOIN_201] (rows=19360357 width=135)
-                                                Conds:RS_27._col2=RS_231._col0(Inner),Output:["_col1","_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col13","_col14","_col16"]
-                                              <-Map 12 [SIMPLE_EDGE] vectorized
-                                                SHUFFLE [RS_231]
-                                                  PartitionCols:_col0
-                                                  Select Operator [SEL_230] (rows=10000000 width=1014)
-                                                    Output:["_col0","_col1"]
-                                                    Filter Operator [FIL_229] (rows=10000000 width=1014)
-                                                      predicate:((ca_country = 'United States') and (ca_state) IN ('KY', 'GA', 'NM', 'MT', 'OR', 'IN', 'WI', 'MO', 'WV') and ca_address_sk is not null)
-                                                      TableScan [TS_6] (rows=40000000 width=1014)
-                                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state","ca_country"]
+                                        PartitionCols:_col12, _col18, _col19
+                                        Filter Operator [FIL_33] (rows=5324097 width=135)
+                                          predicate:(((_col18 = 'D') and (_col19 = 'Primary') and _col5 BETWEEN 50 AND 100) or ((_col18 = 'M') and (_col19 = '4 yr Degree') and _col5 BETWEEN 100 AND 150) or ((_col18 = 'U') and (_col19 = 'Advanced Degree') and _col5 BETWEEN 150 AND 200))
+                                          Merge Join Operator [MERGEJOIN_202] (rows=63889183 width=135)
+                                            Conds:RS_30._col10=RS_232._col0(Inner),Output:["_col2","_col4","_col5","_col6","_col11","_col12","_col13","_col15","_col16","_col18","_col19"]
+                                          <-Map 14 [SIMPLE_EDGE] vectorized
+                                            SHUFFLE [RS_232]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_230]
+                                          <-Reducer 3 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_30]
+                                              PartitionCols:_col10
+                                              Merge Join Operator [MERGEJOIN_201] (rows=58081075 width=135)
+                                                Conds:RS_27._col1, _col3=RS_228._col0, _col5(Inner),Output:["_col2","_col4","_col5","_col6","_col10","_col11","_col12","_col13","_col15","_col16"]
+                                              <-Map 13 [SIMPLE_EDGE] vectorized
+                                                SHUFFLE [RS_228]
+                                                  PartitionCols:_col0, _col5
+                                                  Select Operator [SEL_227] (rows=14398467 width=92)
+                                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                                    Filter Operator [FIL_226] (rows=14398467 width=92)
+                                                      predicate:(wr_item_sk is not null and wr_order_number is not null and 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_6] (rows=14398467 width=92)
+                                                        default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,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"]
                                               <-Reducer 2 [SIMPLE_EDGE]
                                                 SHUFFLE [RS_27]
-                                                  PartitionCols:_col2
-                                                  Merge Join Operator [MERGEJOIN_200] (rows=17600325 width=135)
-                                                    Conds:RS_209._col0, _col5=RS_228._col1, _col3(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col13","_col14"]
-                                                  <-Map 1 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_209]
-                                                      PartitionCols:_col0, _col5
-                                                      Select Operator [SEL_208] (rows=14398467 width=92)
-                                                        Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                                        Filter Operator [FIL_207] (rows=14398467 width=92)
-                                                          predicate:(wr_item_sk is not null and wr_order_number is not null and 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=92)
-                                                            default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,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"]
+                                                  PartitionCols:_col1, _col3
+                                                  Merge Join Operator [MERGEJOIN_200] (rows=52800977 width=135)
+                                                    Conds:RS_225._col0=RS_209._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6"]
                                                   <-Map 11 [SIMPLE_EDGE] vectorized
-                                                    SHUFFLE [RS_228]
-                                                      PartitionCols:_col1, _col3
-                                                      Select Operator [SEL_227] (rows=16000296 width=135)
+                                                    SHUFFLE [RS_209]
+                                                      PartitionCols:_col0
+                                                      Select Operator [SEL_208] (rows=36524 width=1119)
+                                                        Output:["_col0"]
+                                                        Filter Operator [FIL_207] (rows=36524 width=1119)
+                                                          predicate:((d_year = 1998) 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"]
+                                                  <-Map 1 [SIMPLE_EDGE] vectorized
+                                                    SHUFFLE [RS_225]
+                                                      PartitionCols:_col0
+                                                      Select Operator [SEL_224] (rows=48000888 width=135)
                                                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                        Filter Operator [FIL_226] (rows=16000296 width=135)
-                                                          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_35_date_dim_d_date_sk_min) AND DynamicValue(RS_35_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_35_date_dim_d_date_sk_bloom_filter))) and (ws_web_page_sk BETWEEN DynamicValue(RS_32_web_page_wp_web_page_sk_min) AND DynamicValue(RS_32_web_page_wp_web_page_sk_max) and in_bloom_filter(ws_web_page_sk, DynamicValue(RS_32_web_page_wp_web_page_sk_bloom_filter))) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null)
-                                                          TableScan [TS_3] (rows=144002668 width=135)
+                                                        Filter Operator [FIL_223] (rows=48000888 width=135)
+                                                          predicate:((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_25_date_dim_d_date_sk_min) AND DynamicValue(RS_25_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_25_date_dim_d_date_sk_bloom_filter))) and (ws_web_page_sk BETWEEN DynamicValue(RS_42_web_page_wp_web_page_sk_min) AND DynamicValue(RS_42_web_page_wp_web_page_sk_max) and in_bloom_filter(ws_web_page_sk, DynamicValue(RS_42_web_page_wp_web_page_sk_bloom_filter))) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null)
+                                                          TableScan [TS_0] (rows=144002668 width=135)
                                                             default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_order_number","ws_quantity","ws_sales_price","ws_net_profit"]
-                                                          <-Reducer 14 [BROADCAST_EDGE] vectorized
-                                                            BROADCAST [RS_217]
-                                                              Group By Operator [GBY_216] (rows=1 width=12)
+                                                          <-Reducer 12 [BROADCAST_EDGE] vectorized
+                                                            BROADCAST [RS_214]
+                                                              Group By Operator [GBY_213] (rows=1 width=12)
                                                                 Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                              <-Map 13 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                                SHUFFLE [RS_215]
-                                                                  Group By Operator [GBY_214] (rows=1 width=12)
+                                                              <-Map 11 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                                SHUFFLE [RS_212]
+                                                                  Group By Operator [GBY_211] (rows=1 width=12)
                                                                     Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                                    Select Operator [SEL_213] (rows=4602 width=585)
+                                                                    Select Operator [SEL_210] (rows=36524 width=1119)
                                                                       Output:["_col0"]
-                                                                       Please refer to the previous Select Operator [SEL_211]
-                                                          <-Reducer 16 [BROADCAST_EDGE] vectorized
-                                                            BROADCAST [RS_225]
-                                                              Group By Operator [GBY_224] (rows=1 width=12)
+                                                                       Please refer to the previous Select Operator [SEL_208]
+                                                          <-Reducer 17 [BROADCAST_EDGE] vectorized
+                                                            BROADCAST [RS_222]
+                                                              Group By Operator [GBY_221] (rows=1 width=12)
                                                                 Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                              <-Map 15 [CUSTOM_SIMPLE_EDGE] vectorized
-                                                                SHUFFLE [RS_223]
-                                                                  Group By Operator [GBY_222] (rows=1 width=12)
+                                                              <-Map 16 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                                SHUFFLE [RS_220]
+                                                                  Group By Operator [GBY_219] (rows=1 width=12)
                                                                     Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                                    Select Operator [SEL_221] (rows=36524 width=1119)
+                                                                    Select Operator [SEL_218] (rows=4602 width=585)
                                                                       Output:["_col0"]
-                                                                       Please refer to the previous Select Operator [SEL_219]
+                                                                       Please refer to the previous Select Operator [SEL_216]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/perf/tez/query89.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query89.q.out b/ql/src/test/results/clientpositive/perf/tez/query89.q.out
index ee3374e..c120cd9 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query89.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query89.q.out
@@ -85,21 +85,21 @@ Stage-0
                   Select Operator [SEL_29] (rows=383325119 width=88)
                     Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                     PTF Operator [PTF_28] (rows=383325119 width=88)
-                      Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST","partition by:":"_col2, _col0, _col4, _col5"}]
+                      Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS FIRST, _col1 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST","partition by:":"_col3, _col1, _col4, _col5"}]
                       Select Operator [SEL_27] (rows=383325119 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                       <-Reducer 5 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_113]
-                          PartitionCols:_col2, _col0, _col4, _col5
+                          PartitionCols:_col3, _col1, _col4, _col5
                           Group By Operator [GBY_112] (rows=383325119 width=88)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_23]
                               PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
                               Group By Operator [GBY_22] (rows=766650239 width=88)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col3)"],keys:_col5, _col6, _col7, _col10, _col12, _col13
+                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col3)"],keys:_col6, _col8, _col9, _col10, _col12, _col13
                                 Merge Join Operator [MERGEJOIN_84] (rows=766650239 width=88)
-                                  Conds:RS_18._col2=RS_103._col0(Inner),Output:["_col3","_col5","_col6","_col7","_col10","_col12","_col13"]
+                                  Conds:RS_18._col2=RS_103._col0(Inner),Output:["_col3","_col6","_col8","_col9","_col10","_col12","_col13"]
                                 <-Map 12 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_103]
                                     PartitionCols:_col0
@@ -113,37 +113,37 @@ Stage-0
                                   SHUFFLE [RS_18]
                                     PartitionCols:_col2
                                     Merge Join Operator [MERGEJOIN_83] (rows=696954748 width=88)
-                                      Conds:RS_15._col0=RS_95._col0(Inner),Output:["_col2","_col3","_col5","_col6","_col7","_col10"]
+                                      Conds:RS_15._col1=RS_95._col0(Inner),Output:["_col2","_col3","_col6","_col8","_col9","_col10"]
                                     <-Map 10 [SIMPLE_EDGE] vectorized
                                       SHUFFLE [RS_95]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_94] (rows=36524 width=1119)
-                                          Output:["_col0","_col2"]
-                                          Filter Operator [FIL_93] (rows=36524 width=1119)
-                                            predicate:((d_year = 2000) and d_date_sk is not null)
-                                            TableScan [TS_6] (rows=73049 width=1119)
-                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                        Select Operator [SEL_94] (rows=462000 width=1436)
+                                          Output:["_col0","_col1","_col2","_col3"]
+                                          Filter Operator [FIL_93] (rows=462000 width=1436)
+                                            predicate:((((i_category) IN ('Home', 'Books', 'Electronics') and (i_class) IN ('wallpaper', 'parenting', 'musical')) or ((i_category) IN ('Shoes', 'Jewelry', 'Men') and (i_class) IN ('womens', 'birdal', 'pants'))) and i_item_sk is not null)
+                                            TableScan [TS_6] (rows=462000 width=1436)
+                                              default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand","i_class","i_category"]
                                     <-Reducer 2 [SIMPLE_EDGE]
                                       SHUFFLE [RS_15]
-                                        PartitionCols:_col0
+                                        PartitionCols:_col1
                                         Merge Join Operator [MERGEJOIN_82] (rows=633595212 width=88)
-                                          Conds:RS_111._col1=RS_87._col0(Inner),Output:["_col0","_col2","_col3","_col5","_col6","_col7"]
+                                          Conds:RS_111._col0=RS_87._col0(Inner),Output:["_col1","_col2","_col3","_col6"]
                                         <-Map 8 [SIMPLE_EDGE] vectorized
                                           PARTITION_ONLY_SHUFFLE [RS_87]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_86] (rows=231000 width=1436)
-                                              Output:["_col0","_col1","_col2","_col3"]
-                                              Filter Operator [FIL_85] (rows=231000 width=1436)
-                                                predicate:((((i_category) IN ('Home', 'Books', 'Electronics') and (i_class) IN ('wallpaper', 'parenting', 'musical')) or ((i_category) IN ('Shoes', 'Jewelry', 'Men') and (i_class) IN ('womens', 'birdal', 'pants'))) and ((i_category) IN ('Home', 'Books', 'Electronics') or (i_category) IN ('Shoes', 'Jewelry', 'Men')) and ((i_class) IN ('wallpaper', 'parenting', 'musical') or (i_class) IN ('womens', 'birdal', 'pants')) and i_item_sk is not null)
-                                                TableScan [TS_3] (rows=462000 width=1436)
-                                                  default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand","i_class","i_category"]
+                                            Select Operator [SEL_86] (rows=36524 width=1119)
+                                              Output:["_col0","_col2"]
+                                              Filter Operator [FIL_85] (rows=36524 width=1119)
+                                                predicate:((d_year = 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_moy"]
                                         <-Map 1 [SIMPLE_EDGE] vectorized
                                           SHUFFLE [RS_111]
-                                            PartitionCols:_col1
+                                            PartitionCols:_col0
                                             Select Operator [SEL_110] (rows=575995635 width=88)
                                               Output:["_col0","_col1","_col2","_col3"]
                                               Filter Operator [FIL_109] (rows=575995635 width=88)
-                                                predicate:((ss_item_sk BETWEEN DynamicValue(RS_13_item_i_item_sk_min) AND DynamicValue(RS_13_item_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_13_item_i_item_sk_bloom_filter))) and (ss_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and (ss_store_sk BETWEEN DynamicValue(RS_19_store_s_store_sk_min) AND DynamicValue(RS_19_store_s_store_sk_max) and in_bloom_filter(ss_store_sk, DynamicValue(RS_19_store_s_store_sk_bloom_filter))) and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
+                                                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_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and (ss_store_sk BETWEEN DynamicValue(RS_19_store_s_store_sk_min) AND DynamicValue(RS_19_store_s_store_sk_max) and in_bloom_filter(ss_store_sk, DynamicValue(RS_19_store_s_store_sk_bloom_filter))) and ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
                                                 TableScan [TS_0] (rows=575995635 width=88)
                                                   default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_sales_price"]
                                                 <-Reducer 11 [BROADCAST_EDGE] vectorized
@@ -154,7 +154,7 @@ Stage-0
                                                       SHUFFLE [RS_98]
                                                         Group By Operator [GBY_97] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_96] (rows=36524 width=1119)
+                                                          Select Operator [SEL_96] (rows=462000 width=1436)
                                                             Output:["_col0"]
                                                              Please refer to the previous Select Operator [SEL_94]
                                                 <-Reducer 13 [BROADCAST_EDGE] vectorized
@@ -176,7 +176,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_90]
                                                         Group By Operator [GBY_89] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_88] (rows=231000 width=1436)
+                                                          Select Operator [SEL_88] (rows=36524 width=1119)
                                                             Output:["_col0"]
                                                              Please refer to the previous Select Operator [SEL_86]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/perf/tez/query91.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query91.q.out b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
index a53c7d79..7a64949 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
@@ -61,124 +61,122 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Reducer 10 <- Map 13 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
-Reducer 11 <- Map 14 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
-Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
-Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 12 <- Map 14 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 Reducer 4 <- Reducer 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
-Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 5 <- Map 15 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
     limit:-1
     Stage-1
-      Reducer 6 vectorized
+      Reducer 7 vectorized
       File Output Operator [FS_170]
         Select Operator [SEL_169] (rows=58564004 width=860)
           Output:["_col0","_col1","_col2","_col3"]
-        <-Reducer 5 [SIMPLE_EDGE] vectorized
+        <-Reducer 6 [SIMPLE_EDGE] vectorized
           SHUFFLE [RS_168]
             Select Operator [SEL_167] (rows=58564004 width=860)
               Output:["_col0","_col1","_col2","_col4"]
               Group By Operator [GBY_166] (rows=58564004 width=860)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
-              <-Reducer 4 [SIMPLE_EDGE]
+              <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_42]
                   PartitionCols:_col0, _col1, _col2, _col3, _col4
                   Group By Operator [GBY_41] (rows=117128008 width=860)
-                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col3)"],keys:_col8, _col9, _col10, _col18, _col19
+                    Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col12)"],keys:_col5, _col6, _col17, _col18, _col19
                     Merge Join Operator [MERGEJOIN_144] (rows=117128008 width=860)
-                      Conds:RS_37._col1=RS_38._col2(Inner),Output:["_col3","_col8","_col9","_col10","_col18","_col19"]
-                    <-Reducer 12 [SIMPLE_EDGE]
-                      SHUFFLE [RS_38]
-                        PartitionCols:_col2
-                        Select Operator [SEL_30] (rows=106480005 width=860)
-                          Output:["_col2","_col7","_col8"]
-                          Merge Join Operator [MERGEJOIN_143] (rows=106480005 width=860)
-                            Conds:RS_27._col2=RS_165._col0(Inner),Output:["_col0","_col5","_col6"]
-                          <-Map 15 [SIMPLE_EDGE] vectorized
-                            SHUFFLE [RS_165]
-                              PartitionCols:_col0
-                              Select Operator [SEL_164] (rows=3600 width=107)
-                                Output:["_col0"]
-                                Filter Operator [FIL_163] (rows=3600 width=107)
-                                  predicate:((hd_buy_potential like '0-500%') and hd_demo_sk is not null)
-                                  TableScan [TS_18] (rows=7200 width=107)
-                                    default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential"]
-                          <-Reducer 11 [SIMPLE_EDGE]
-                            SHUFFLE [RS_27]
-                              PartitionCols:_col2
-                              Merge Join Operator [MERGEJOIN_142] (rows=96800003 width=860)
-                                Conds:RS_24._col3=RS_162._col0(Inner),Output:["_col0","_col2","_col5","_col6"]
-                              <-Map 14 [SIMPLE_EDGE] vectorized
-                                SHUFFLE [RS_162]
-                                  PartitionCols:_col0
-                                  Select Operator [SEL_161] (rows=20000000 width=1014)
-                                    Output:["_col0"]
-                                    Filter Operator [FIL_160] (rows=20000000 width=1014)
-                                      predicate:((ca_gmt_offset = -7) and ca_address_sk is not null)
-                                      TableScan [TS_15] (rows=40000000 width=1014)
-                                        default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
-                              <-Reducer 10 [SIMPLE_EDGE]
-                                SHUFFLE [RS_24]
-                                  PartitionCols:_col3
-                                  Merge Join Operator [MERGEJOIN_141] (rows=88000001 width=860)
-                                    Conds:RS_156._col1=RS_159._col0(Inner),Output:["_col0","_col2","_col3","_col5","_col6"]
-                                  <-Map 13 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_159]
-                                      PartitionCols:_col0
-                                      Select Operator [SEL_158] (rows=930900 width=385)
-                                        Output:["_col0","_col1","_col2"]
-                                        Filter Operator [FIL_157] (rows=930900 width=385)
-                                          predicate:((((cd_marital_status = 'M') and (cd_education_status = 'Unknown')) or ((cd_marital_status = 'W') and (cd_education_status = 'Advanced Degree'))) and ((cd_education_status = 'Unknown') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'W')) and cd_demo_sk is not null)
-                                          TableScan [TS_12] (rows=1861800 width=385)
-                                            default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
-                                  <-Map 9 [SIMPLE_EDGE] vectorized
-                                    SHUFFLE [RS_156]
-                                      PartitionCols:_col1
-                                      Select Operator [SEL_155] (rows=80000000 width=860)
-                                        Output:["_col0","_col1","_col2","_col3"]
-                                        Filter Operator [FIL_154] (rows=80000000 width=860)
-                                          predicate:(c_current_addr_sk is not null and c_current_cdemo_sk is not null and c_current_hdemo_sk is not null and c_customer_sk is not null)
-                                          TableScan [TS_9] (rows=80000000 width=860)
-                                            default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_cdemo_sk","c_current_hdemo_sk","c_current_addr_sk"]
-                    <-Reducer 3 [SIMPLE_EDGE]
+                      Conds:RS_37._col2=RS_165._col0(Inner),Output:["_col5","_col6","_col12","_col17","_col18","_col19"]
+                    <-Map 15 [SIMPLE_EDGE] vectorized
+                      SHUFFLE [RS_165]
+                        PartitionCols:_col0
+                        Select Operator [SEL_164] (rows=3600 width=107)
+                          Output:["_col0"]
+                          Filter Operator [FIL_163] (rows=3600 width=107)
+                            predicate:((hd_buy_potential like '0-500%') and hd_demo_sk is not null)
+                            TableScan [TS_25] (rows=7200 width=107)
+                              default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential"]
+                    <-Reducer 4 [SIMPLE_EDGE]
                       SHUFFLE [RS_37]
-                        PartitionCols:_col1
-                        Merge Join Operator [MERGEJOIN_140] (rows=34846646 width=106)
-                          Conds:RS_34._col2=RS_153._col0(Inner),Output:["_col1","_col3","_col8","_col9","_col10"]
-                        <-Map 8 [SIMPLE_EDGE] vectorized
-                          SHUFFLE [RS_153]
-                            PartitionCols:_col0
-                            Select Operator [SEL_152] (rows=60 width=2045)
-                              Output:["_col0","_col1","_col2","_col3"]
-                              Filter Operator [FIL_151] (rows=60 width=2045)
-                                predicate:cc_call_center_sk is not null
-                                TableScan [TS_6] (rows=60 width=2045)
-                                  default@call_center,call_center,Tbl:COMPLETE,Col:NONE,Output:["cc_call_center_sk","cc_call_center_id","cc_name","cc_manager"]
-                        <-Reducer 2 [SIMPLE_EDGE]
-                          SHUFFLE [RS_34]
-                            PartitionCols:_col2
-                            Merge Join Operator [MERGEJOIN_139] (rows=31678769 width=106)
-                              Conds:RS_147._col0=RS_150._col0(Inner),Output:["_col1","_col2","_col3"]
-                            <-Map 1 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_147]
+                        PartitionCols:_col2
+                        Merge Join Operator [MERGEJOIN_143] (rows=106480005 width=860)
+                          Conds:RS_34._col0=RS_35._col1(Inner),Output:["_col2","_col5","_col6","_col12","_col17","_col18","_col19"]
+                        <-Reducer 12 [SIMPLE_EDGE]
+                          SHUFFLE [RS_35]
+                            PartitionCols:_col1
+                            Merge Join Operator [MERGEJOIN_142] (rows=34846646 width=106)
+                              Conds:RS_21._col2=RS_162._col0(Inner),Output:["_col1","_col3","_col8","_col9","_col10"]
+                            <-Map 14 [SIMPLE_EDGE] vectorized
+                              SHUFFLE [RS_162]
                                 PartitionCols:_col0
-                                Select Operator [SEL_146] (rows=28798881 width=106)
+                                Select Operator [SEL_161] (rows=60 width=2045)
                                   Output:["_col0","_col1","_col2","_col3"]
-                                  Filter Operator [FIL_145] (rows=28798881 width=106)
-                                    predicate:(cr_call_center_sk is not null and cr_returned_date_sk is not null and cr_returning_customer_sk is not null)
-                                    TableScan [TS_0] (rows=28798881 width=106)
-                                      default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_returning_customer_sk","cr_call_center_sk","cr_net_loss"]
-                            <-Map 7 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_150]
+                                  Filter Operator [FIL_160] (rows=60 width=2045)
+                                    predicate:cc_call_center_sk is not null
+                                    TableScan [TS_15] (rows=60 width=2045)
+                                      default@call_center,call_center,Tbl:COMPLETE,Col:NONE,Output:["cc_call_center_sk","cc_call_center_id","cc_name","cc_manager"]
+                            <-Reducer 11 [SIMPLE_EDGE]
+                              SHUFFLE [RS_21]
+                                PartitionCols:_col2
+                                Merge Join Operator [MERGEJOIN_141] (rows=31678769 width=106)
+                                  Conds:RS_156._col0=RS_159._col0(Inner),Output:["_col1","_col2","_col3"]
+                                <-Map 10 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_156]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_155] (rows=28798881 width=106)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_154] (rows=28798881 width=106)
+                                        predicate:(cr_call_center_sk is not null and cr_returned_date_sk is not null and cr_returning_customer_sk is not null)
+                                        TableScan [TS_9] (rows=28798881 width=106)
+                                          default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_returned_date_sk","cr_returning_customer_sk","cr_call_center_sk","cr_net_loss"]
+                                <-Map 13 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_159]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_158] (rows=18262 width=1119)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_157] (rows=18262 width=1119)
+                                        predicate:((d_moy = 11) and (d_year = 1999) and d_date_sk is not null)
+                                        TableScan [TS_12] (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_34]
+                            PartitionCols:_col0
+                            Merge Join Operator [MERGEJOIN_140] (rows=96800003 width=860)
+                              Conds:RS_31._col3=RS_153._col0(Inner),Output:["_col0","_col2","_col5","_col6"]
+                            <-Map 9 [SIMPLE_EDGE] vectorized
+                              SHUFFLE [RS_153]
                                 PartitionCols:_col0
-                                Select Operator [SEL_149] (rows=18262 width=1119)
+                                Select Operator [SEL_152] (rows=20000000 width=1014)
                                   Output:["_col0"]
-                                  Filter Operator [FIL_148] (rows=18262 width=1119)
-                                    predicate:((d_moy = 11) and (d_year = 1999) 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_moy"]
+                                  Filter Operator [FIL_151] (rows=20000000 width=1014)
+                                    predicate:((ca_gmt_offset = -7) and ca_address_sk is not null)
+                                    TableScan [TS_6] (rows=40000000 width=1014)
+                                      default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
+                            <-Reducer 2 [SIMPLE_EDGE]
+                              SHUFFLE [RS_31]
+                                PartitionCols:_col3
+                                Merge Join Operator [MERGEJOIN_139] (rows=88000001 width=860)
+                                  Conds:RS_147._col1=RS_150._col0(Inner),Output:["_col0","_col2","_col3","_col5","_col6"]
+                                <-Map 1 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_147]
+                                    PartitionCols:_col1
+                                    Select Operator [SEL_146] (rows=80000000 width=860)
+                                      Output:["_col0","_col1","_col2","_col3"]
+                                      Filter Operator [FIL_145] (rows=80000000 width=860)
+                                        predicate:(c_current_addr_sk is not null and c_current_cdemo_sk is not null and c_current_hdemo_sk is not null and c_customer_sk is not null)
+                                        TableScan [TS_0] (rows=80000000 width=860)
+                                          default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_cdemo_sk","c_current_hdemo_sk","c_current_addr_sk"]
+                                <-Map 8 [SIMPLE_EDGE] vectorized
+                                  SHUFFLE [RS_150]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_149] (rows=930900 width=385)
+                                      Output:["_col0","_col1","_col2"]
+                                      Filter Operator [FIL_148] (rows=930900 width=385)
+                                        predicate:((cd_education_status) IN ('Unknown', 'Advanced Degree') and (cd_marital_status) IN ('M', 'W') and (struct(cd_marital_status,cd_education_status)) IN (const struct('M','Unknown'), const struct('W','Advanced Degree')) and cd_demo_sk is not null)
+                                        TableScan [TS_3] (rows=1861800 width=385)
+                                          default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/perf/tez/query98.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query98.q.out b/ql/src/test/results/clientpositive/perf/tez/query98.q.out
index 4915d2b..0260972 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query98.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query98.q.out
@@ -103,9 +103,9 @@ Stage-0
                           <-Map 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_68]
                               PartitionCols:_col0
-                              Select Operator [SEL_67] (rows=231000 width=1436)
+                              Select Operator [SEL_67] (rows=462000 width=1436)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                Filter Operator [FIL_66] (rows=231000 width=1436)
+                                Filter Operator [FIL_66] (rows=462000 width=1436)
                                   predicate:((i_category) IN ('Jewelry', 'Sports', 'Books') and i_item_sk is not null)
                                   TableScan [TS_6] (rows=462000 width=1436)
                                     default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc","i_current_price","i_class","i_category"]
@@ -140,7 +140,7 @@ Stage-0
                                             SHUFFLE [RS_71]
                                               Group By Operator [GBY_70] (rows=1 width=12)
                                                 Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                Select Operator [SEL_69] (rows=231000 width=1436)
+                                                Select Operator [SEL_69] (rows=462000 width=1436)
                                                   Output:["_col0"]
                                                    Please refer to the previous Select Operator [SEL_67]
                                       <-Reducer 8 [BROADCAST_EDGE] vectorized

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/pointlookup.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup.q.out b/ql/src/test/results/clientpositive/pointlookup.q.out
index 69ae098..a4ca803 100644
--- a/ql/src/test/results/clientpositive/pointlookup.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup.q.out
@@ -149,14 +149,14 @@ STAGE PLANS:
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (struct(key,value)) IN (const struct('0','val_0'), const struct('1','val_1'), const struct('2','val_2'), const struct('3','val_3'), const struct('4','val_4'), const struct('5','val_5'), const struct('6','val_6'), const struct('7','val_7'), const struct('8','val_8'), const struct('9','val_9'), const struct('10','val_10')) (type: boolean)
-              Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -254,14 +254,14 @@ STAGE PLANS:
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (struct(key,value)) IN (const struct('0','val_0'), const struct('1','val_1'), const struct('2','val_2'), const struct('3','val_3'), const struct('4','val_4'), const struct('5','val_5'), const struct('6','val_6'), const struct('7','val_7'), const struct('8','val_8'), const struct('9','val_9'), const struct('10','val_10')) (type: boolean)
-              Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/pointlookup2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup2.q.out b/ql/src/test/results/clientpositive/pointlookup2.q.out
index 1eba541..b627a56 100644
--- a/ql/src/test/results/clientpositive/pointlookup2.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup2.q.out
@@ -2593,7 +2593,7 @@ STAGE PLANS:
           Filter Operator
             isSamplingPred: false
             predicate: (struct(_col2,_col4)) IN (const struct('2000-04-08',1), const struct('2000-04-09',2)) (type: boolean)
-            Statistics: Num rows: 10 Data size: 270 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 20 Data size: 540 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               GlobalTableId: 0
@@ -2622,7 +2622,7 @@ STAGE PLANS:
               key expressions: _col4 (type: int), _col5 (type: string), _col2 (type: string)
               null sort order: aaa
               sort order: +++
-              Statistics: Num rows: 10 Data size: 270 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 20 Data size: 540 Basic stats: COMPLETE Column stats: NONE
               tag: -1
               value expressions: _col0 (type: int), _col1 (type: string), _col3 (type: string)
               auto parallelism: false
@@ -2659,13 +2659,13 @@ STAGE PLANS:
         Select Operator
           expressions: VALUE._col0 (type: int), VALUE._col1 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          Statistics: Num rows: 10 Data size: 270 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 20 Data size: 540 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             GlobalTableId: 0
 #### A masked pattern was here ####
             NumFilesPerFileSink: 1
-            Statistics: Num rows: 10 Data size: 270 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 20 Data size: 540 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -2719,15 +2719,15 @@ STAGE PLANS:
             Filter Operator
               isSamplingPred: false
               predicate: (key) IN (1, 2) (type: boolean)
-              Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), value (type: string), ds (type: string)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   null sort order: 
                   sort order: 
-                  Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
                   tag: 0
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
                   auto parallelism: false
@@ -2960,11 +2960,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          Statistics: Num rows: 30 Data size: 810 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 60 Data size: 1620 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             isSamplingPred: false
             predicate: (struct(_col0,_col3)) IN (const struct(1,'2000-04-08'), const struct(2,'2000-04-09')) (type: boolean)
-            Statistics: Num rows: 8 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 30 Data size: 810 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               GlobalTableId: 0
@@ -2993,7 +2993,7 @@ STAGE PLANS:
               key expressions: _col0 (type: int), _col1 (type: string), _col3 (type: string)
               null sort order: aaa
               sort order: +++
-              Statistics: Num rows: 8 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 30 Data size: 810 Basic stats: COMPLETE Column stats: NONE
               tag: -1
               value expressions: _col2 (type: string), _col4 (type: int), _col5 (type: string)
               auto parallelism: false
@@ -3030,13 +3030,13 @@ STAGE PLANS:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col1 (type: int), VALUE._col2 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          Statistics: Num rows: 8 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 30 Data size: 810 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             GlobalTableId: 0
 #### A masked pattern was here ####
             NumFilesPerFileSink: 1
-            Statistics: Num rows: 8 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 30 Data size: 810 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/pointlookup3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup3.q.out b/ql/src/test/results/clientpositive/pointlookup3.q.out
index 8835d41..855e2da 100644
--- a/ql/src/test/results/clientpositive/pointlookup3.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup3.q.out
@@ -2318,15 +2318,15 @@ STAGE PLANS:
             Filter Operator
               isSamplingPred: false
               predicate: (key) IN (1, 2) (type: boolean)
-              Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), value (type: string), ds1 (type: string), ds2 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   null sort order: 
                   sort order: 
-                  Statistics: Num rows: 30 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE
                   tag: 1
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string)
                   auto parallelism: false
@@ -2493,11 +2493,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-          Statistics: Num rows: 1200 Data size: 20400 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 2400 Data size: 40800 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             isSamplingPred: false
             predicate: (struct(_col2,_col4)) IN (const struct('2000-04-08',1), const struct('2000-04-09',2)) (type: boolean)
-            Statistics: Num rows: 300 Data size: 5100 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1200 Data size: 20400 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               GlobalTableId: 0
@@ -2526,7 +2526,7 @@ STAGE PLANS:
               key expressions: _col4 (type: int), _col5 (type: string), _col2 (type: string)
               null sort order: aaa
               sort order: +++
-              Statistics: Num rows: 300 Data size: 5100 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1200 Data size: 20400 Basic stats: COMPLETE Column stats: NONE
               tag: -1
               value expressions: _col0 (type: int), _col1 (type: string), _col3 (type: string), _col6 (type: string), _col7 (type: string)
               auto parallelism: false
@@ -2563,13 +2563,13 @@ STAGE PLANS:
         Select Operator
           expressions: VALUE._col0 (type: int), VALUE._col1 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: string), VALUE._col3 (type: string), VALUE._col4 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-          Statistics: Num rows: 300 Data size: 5100 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1200 Data size: 20400 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             GlobalTableId: 0
 #### A masked pattern was here ####
             NumFilesPerFileSink: 1
-            Statistics: Num rows: 300 Data size: 5100 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1200 Data size: 20400 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/ppd_transform.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_transform.q.out b/ql/src/test/results/clientpositive/ppd_transform.q.out
index b38088f..6d5da08 100644
--- a/ql/src/test/results/clientpositive/ppd_transform.q.out
+++ b/ql/src/test/results/clientpositive/ppd_transform.q.out
@@ -382,7 +382,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: ((_col0 = 'a') or (_col0 = 'b')) (type: boolean)
+                  predicate: (_col0) IN ('a', 'b') (type: boolean)
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
@@ -392,7 +392,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                 Filter Operator
-                  predicate: ((_col0 = 'c') or (_col0 = 'd')) (type: boolean)
+                  predicate: (_col0) IN ('c', 'd') (type: boolean)
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/remove_exprs_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/remove_exprs_stats.q.out b/ql/src/test/results/clientpositive/remove_exprs_stats.q.out
index a9c0051..712fb37 100644
--- a/ql/src/test/results/clientpositive/remove_exprs_stats.q.out
+++ b/ql/src/test/results/clientpositive/remove_exprs_stats.q.out
@@ -460,13 +460,13 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: loc_orc_n0
-            filterExpr: (locid) IN (5) (type: boolean)
+            filterExpr: (locid = 5) (type: boolean)
             Statistics: Num rows: 8 Data size: 816 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
-              predicate: (locid) IN (5) (type: boolean)
+              predicate: (locid = 5) (type: boolean)
               Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE
               Select Operator
-                expressions: state (type: string), locid (type: int), zip (type: bigint), year (type: int)
+                expressions: state (type: string), 5 (type: int), zip (type: bigint), year (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3
                 Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
index 894ab3d..9cc2de4 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
@@ -720,13 +720,13 @@ STAGE PLANS:
                   1 
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                 residual filter predicates: {(struct(_col0,_col3)) IN (const struct(100,100), const struct(101,101), const struct(102,102))}
-                Statistics: Num rows: 6 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 18 Data size: 357 Basic stats: COMPLETE Column stats: NONE
                 Limit
                   Number of rows: 10
-                  Statistics: Num rows: 6 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 6 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE Column stats: NONE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/spark/auto_join19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_join19.q.out b/ql/src/test/results/clientpositive/spark/auto_join19.q.out
index d7d8cae..07bee85 100644
--- a/ql/src/test/results/clientpositive/spark/auto_join19.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_join19.q.out
@@ -56,7 +56,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src1
-                  filterExpr: (((ds = '2008-04-08') or (ds = '2008-04-09')) and ((hr = '12') or (hr = '11')) and key is not null) (type: boolean)
+                  filterExpr: ((ds) IN ('2008-04-08', '2008-04-09') and (hr) IN ('12', '11') and key is not null) (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: key is not null (type: boolean)

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
index e07904a..ad1561f 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
@@ -82,10 +82,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (((key = 0) or (key = 5)) and key is not null) (type: boolean)
+                  filterExpr: ((key) IN (0, 5) and (ds = '1')) (type: boolean)
                   Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), value (type: string)
@@ -236,10 +236,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: test_table1_n20
-                  filterExpr: (((key = 0) or (key = 5)) and key is not null) (type: boolean)
+                  filterExpr: ((key) IN (0, 5) and (ds = '1')) (type: boolean)
                   Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), value (type: string)
@@ -396,15 +396,15 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: test_table1_n20
-                  filterExpr: ((key < 8) and ((key = 0) or (key = 5))) (type: boolean)
+                  filterExpr: ((key) IN (0, 5) and (key < 8)) (type: boolean)
                   Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((key = 0) or (key = 5)) and (key < 8)) (type: boolean)
-                    Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE
+                    predicate: ((key < 8) and (key) IN (0, 5)) (type: boolean)
+                    Statistics: Num rows: 3 Data size: 21 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), value (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 3 Data size: 21 Basic stats: COMPLETE Column stats: NONE
                       Sorted Merge Bucket Map Join Operator
                         condition map:
                              Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/20c95c1c/ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out b/ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out
index a35edb4..e61300b 100644
--- a/ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out
+++ b/ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out
@@ -851,9 +851,9 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: cbo_t2
-          filterExpr: (c_int) IN (c_int, (2 * c_int)) (type: boolean)
+          filterExpr: ((c_int = c_int) or (c_int = (2 * c_int))) (type: boolean)
           Filter Operator
-            predicate: (c_int) IN (c_int, (2 * c_int)) (type: boolean)
+            predicate: ((c_int = (2 * c_int)) or (c_int = c_int)) (type: boolean)
             Select Operator
               expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
@@ -875,9 +875,9 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: cbo_t2
-          filterExpr: (c_int) IN (c_int, 0) (type: boolean)
+          filterExpr: ((c_int = c_int) or (c_int = 0)) (type: boolean)
           Filter Operator
-            predicate: (c_int) IN (c_int, 0) (type: boolean)
+            predicate: ((c_int = 0) or (c_int = c_int)) (type: boolean)
             Select Operator
               expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5