HIVE-18797 : ExprConstNodeDesc's getExprString should put appropriate qualifier with...
[hive.git] / ql / src / test / results / clientpositive / llap / explainuser_1.q.out
1 PREHOOK: query: explain create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
2 PREHOOK: type: CREATETABLE
3 POSTHOOK: query: explain create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
4 POSTHOOK: type: CREATETABLE
5 Stage-0
6   Create Table Operator:
7     name:default.src_orc_merge_test_part
8
9 PREHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
10 PREHOOK: type: CREATETABLE
11 PREHOOK: Output: database:default
12 PREHOOK: Output: default@src_orc_merge_test_part
13 POSTHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
14 POSTHOOK: type: CREATETABLE
15 POSTHOOK: Output: database:default
16 POSTHOOK: Output: default@src_orc_merge_test_part
17 PREHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
18 PREHOOK: type: ALTERTABLE_ADDPARTS
19 PREHOOK: Output: default@src_orc_merge_test_part
20 POSTHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
21 POSTHOOK: type: ALTERTABLE_ADDPARTS
22 POSTHOOK: Output: default@src_orc_merge_test_part
23 POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
24 PREHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
25 PREHOOK: type: DESCTABLE
26 PREHOOK: Input: default@src_orc_merge_test_part
27 POSTHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
28 POSTHOOK: type: DESCTABLE
29 POSTHOOK: Input: default@src_orc_merge_test_part
30 key                     int                                         
31 value                   string                                      
32 ds                      string                                      
33 ts                      string                                      
34                  
35 # Partition Information          
36 # col_name              data_type               comment             
37 ds                      string                                      
38 ts                      string                                      
39                  
40 #### A masked pattern was here ####
41 PREHOOK: query: explain insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
42 PREHOOK: type: QUERY
43 POSTHOOK: query: explain insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
44 POSTHOOK: type: QUERY
45 Plan optimized by CBO.
46
47 Vertex dependency in root stage
48 Reducer 2 <- Map 1 (SIMPLE_EDGE)
49
50 Stage-3
51   Stats Work{}
52     Stage-0
53       Move Operator
54         table:{"name:":"default.src_orc_merge_test_part"}
55         Stage-2
56           Dependency Collection{}
57             Stage-1
58               Reducer 2 llap
59               File Output Operator [FS_6]
60                 Select Operator [SEL_5] (rows=1 width=1077)
61                   Output:["_col0","_col1","_col2","_col3"]
62                   Group By Operator [GBY_4] (rows=1 width=1077)
63                     Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"],keys:KEY._col0, KEY._col1
64                   <-Map 1 [SIMPLE_EDGE] llap
65                     File Output Operator [FS_3]
66                       table:{"name:":"default.src_orc_merge_test_part"}
67                       Select Operator [SEL_1] (rows=500 width=95)
68                         Output:["_col0","_col1"]
69                         TableScan [TS_0] (rows=500 width=178)
70                           default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
71                     SHUFFLE [RS_3]
72                       PartitionCols:_col0, _col1
73                       Group By Operator [GBY_2] (rows=1 width=1061)
74                         Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(key, 'hll')","compute_stats(value, 'hll')"],keys:ds, ts
75                         Select Operator [SEL_1] (rows=500 width=292)
76                           Output:["key","value","ds","ts"]
77                            Please refer to the previous Select Operator [SEL_1]
78
79 PREHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
80 PREHOOK: type: QUERY
81 PREHOOK: Input: default@src
82 PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
83 POSTHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
84 POSTHOOK: type: QUERY
85 POSTHOOK: Input: default@src
86 POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
87 POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
88 POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
89 PREHOOK: query: explain insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100
90 PREHOOK: type: QUERY
91 POSTHOOK: query: explain insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100
92 POSTHOOK: type: QUERY
93 Plan optimized by CBO.
94
95 Vertex dependency in root stage
96 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
97 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
98
99 Stage-3
100   Stats Work{}
101     Stage-0
102       Move Operator
103         table:{"name:":"default.src_orc_merge_test_part"}
104         Stage-2
105           Dependency Collection{}
106             Stage-1
107               Reducer 3 llap
108               File Output Operator [FS_6]
109                 Select Operator [SEL_5] (rows=1 width=1077)
110                   Output:["_col0","_col1","_col2","_col3"]
111                   Group By Operator [GBY_4] (rows=1 width=1077)
112                     Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"],keys:KEY._col0, KEY._col1
113                   <-Reducer 2 [SIMPLE_EDGE] llap
114                     File Output Operator [FS_7]
115                       table:{"name:":"default.src_orc_merge_test_part"}
116                       Select Operator [SEL_6] (rows=100 width=95)
117                         Output:["_col0","_col1"]
118                         Limit [LIM_5] (rows=100 width=178)
119                           Number of rows:100
120                           Select Operator [SEL_4] (rows=100 width=178)
121                             Output:["_col0","_col1"]
122                           <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
123                             PARTITION_ONLY_SHUFFLE [RS_3]
124                               Limit [LIM_2] (rows=100 width=178)
125                                 Number of rows:100
126                                 Select Operator [SEL_1] (rows=500 width=178)
127                                   Output:["_col0","_col1"]
128                                   TableScan [TS_0] (rows=500 width=178)
129                                     default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
130                     SHUFFLE [RS_3]
131                       PartitionCols:_col0, _col1
132                       Group By Operator [GBY_2] (rows=1 width=1061)
133                         Output:["_col0","_col1","_col2","_col3"],aggregations:["compute_stats(key, 'hll')","compute_stats(value, 'hll')"],keys:ds, ts
134                         Select Operator [SEL_1] (rows=100 width=292)
135                           Output:["key","value","ds","ts"]
136                            Please refer to the previous Select Operator [SEL_6]
137
138 PREHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
139 PREHOOK: type: QUERY
140 POSTHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
141 POSTHOOK: type: QUERY
142 Plan optimized by CBO.
143
144 Stage-0
145   Fetch Operator
146     limit:1
147
148 PREHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
149 PREHOOK: type: QUERY
150 POSTHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
151 POSTHOOK: type: QUERY
152 Plan optimized by CBO.
153
154 Vertex dependency in root stage
155 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
156
157 Stage-0
158   Fetch Operator
159     limit:-1
160     Stage-1
161       Reducer 2 llap
162       File Output Operator [FS_8]
163         Group By Operator [GBY_6] (rows=1 width=16)
164           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
165         <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
166           PARTITION_ONLY_SHUFFLE [RS_5]
167             Group By Operator [GBY_4] (rows=1 width=16)
168               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
169               Select Operator [SEL_2] (rows=500 width=95)
170                 Output:["_col0","_col1"]
171                 TableScan [TS_0] (rows=500 width=95)
172                   default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
173
174 PREHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate
175 PREHOOK: type: ALTER_PARTITION_MERGE
176 PREHOOK: Input: default@src_orc_merge_test_part
177 PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
178 POSTHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate
179 POSTHOOK: type: ALTER_PARTITION_MERGE
180 POSTHOOK: Input: default@src_orc_merge_test_part
181 POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
182 PREHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
183 PREHOOK: type: QUERY
184 POSTHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
185 POSTHOOK: type: QUERY
186 Plan optimized by CBO.
187
188 Vertex dependency in root stage
189 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
190
191 Stage-0
192   Fetch Operator
193     limit:-1
194     Stage-1
195       Reducer 2 llap
196       File Output Operator [FS_7]
197         Group By Operator [GBY_5] (rows=1 width=8)
198           Output:["_col0"],aggregations:["count(VALUE._col0)"]
199         <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
200           PARTITION_ONLY_SHUFFLE [RS_4]
201             Group By Operator [GBY_3] (rows=1 width=8)
202               Output:["_col0"],aggregations:["count()"]
203               Select Operator [SEL_2] (rows=500 width=102)
204                 TableScan [TS_0] (rows=500 width=102)
205                   default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:COMPLETE
206
207 PREHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
208 PREHOOK: type: QUERY
209 POSTHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
210 POSTHOOK: type: QUERY
211 Plan optimized by CBO.
212
213 Vertex dependency in root stage
214 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
215
216 Stage-0
217   Fetch Operator
218     limit:-1
219     Stage-1
220       Reducer 2 llap
221       File Output Operator [FS_8]
222         Group By Operator [GBY_6] (rows=1 width=16)
223           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
224         <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
225           PARTITION_ONLY_SHUFFLE [RS_5]
226             Group By Operator [GBY_4] (rows=1 width=16)
227               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
228               Select Operator [SEL_2] (rows=500 width=95)
229                 Output:["_col0","_col1"]
230                 TableScan [TS_0] (rows=500 width=95)
231                   default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
232
233 PREHOOK: query: drop table src_orc_merge_test_part
234 PREHOOK: type: DROPTABLE
235 PREHOOK: Input: default@src_orc_merge_test_part
236 PREHOOK: Output: default@src_orc_merge_test_part
237 POSTHOOK: query: drop table src_orc_merge_test_part
238 POSTHOOK: type: DROPTABLE
239 POSTHOOK: Input: default@src_orc_merge_test_part
240 POSTHOOK: Output: default@src_orc_merge_test_part
241 Warning: Shuffle Join MERGEJOIN[18][tables = [src1, src2]] in Stage 'Reducer 2' is a cross product
242 PREHOOK: query: explain select sum(hash(a.k1,a.v1,a.k2, a.v2))
243 from (
244 select src1.key as k1, src1.value as v1, 
245        src2.key as k2, src2.value as v2 FROM 
246   (select * FROM src WHERE src.key < 10) src1 
247     JOIN 
248   (select * FROM src WHERE src.key < 10) src2
249   SORT BY k1, v1, k2, v2
250 ) a
251 PREHOOK: type: QUERY
252 POSTHOOK: query: explain select sum(hash(a.k1,a.v1,a.k2, a.v2))
253 from (
254 select src1.key as k1, src1.value as v1, 
255        src2.key as k2, src2.value as v2 FROM 
256   (select * FROM src WHERE src.key < 10) src1 
257     JOIN 
258   (select * FROM src WHERE src.key < 10) src2
259   SORT BY k1, v1, k2, v2
260 ) a
261 POSTHOOK: type: QUERY
262 Plan not optimized by CBO.
263
264 Vertex dependency in root stage
265 Reducer 2 <- Map 1 (XPROD_EDGE), Map 4 (XPROD_EDGE)
266 Reducer 3 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
267
268 Stage-0
269   Fetch Operator
270     limit:-1
271     Stage-1
272       Reducer 3 llap
273       File Output Operator [FS_15]
274         Group By Operator [GBY_13] (rows=1 width=8)
275           Output:["_col0"],aggregations:["sum(VALUE._col0)"]
276         <-Reducer 2 [CUSTOM_SIMPLE_EDGE] llap
277           PARTITION_ONLY_SHUFFLE [RS_12]
278             Group By Operator [GBY_11] (rows=1 width=8)
279               Output:["_col0"],aggregations:["sum(hash(_col0,_col1,_col2,_col3))"]
280               Merge Join Operator [MERGEJOIN_18] (rows=27556 width=356)
281                 Conds:(Inner),Output:["_col0","_col1","_col2","_col3"]
282               <-Map 1 [XPROD_EDGE] llap
283                 XPROD_EDGE [RS_6]
284                   Select Operator [SEL_2] (rows=166 width=178)
285                     Output:["_col0","_col1"]
286                     Filter Operator [FIL_16] (rows=166 width=178)
287                       predicate:(key < 10)
288                       TableScan [TS_0] (rows=500 width=178)
289                         default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
290               <-Map 4 [XPROD_EDGE] llap
291                 XPROD_EDGE [RS_7]
292                   Select Operator [SEL_5] (rows=166 width=178)
293                     Output:["_col0","_col1"]
294                     Filter Operator [FIL_17] (rows=166 width=178)
295                       predicate:(key < 10)
296                       TableScan [TS_3] (rows=500 width=178)
297                         default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
298
299 PREHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key
300 PREHOOK: type: QUERY
301 POSTHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key
302 POSTHOOK: type: QUERY
303 Plan optimized by CBO.
304
305 Vertex dependency in root stage
306 Reducer 2 <- Map 1 (SIMPLE_EDGE)
307
308 Stage-0
309   Fetch Operator
310     limit:-1
311     Stage-1
312       Reducer 2 llap
313       File Output Operator [FS_7]
314         Select Operator [SEL_5] (rows=10 width=97)
315           Output:["_col0","_col1","_col2"]
316           Group By Operator [GBY_4] (rows=10 width=101)
317             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
318           <-Map 1 [SIMPLE_EDGE] llap
319             SHUFFLE [RS_3]
320               PartitionCols:_col0, _col1, _col2
321               Group By Operator [GBY_2] (rows=10 width=101)
322                 Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
323                 Select Operator [SEL_1] (rows=20 width=88)
324                   Output:["key","c_int","c_float"]
325                   TableScan [TS_0] (rows=20 width=88)
326                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
327
328 PREHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x
329 PREHOOK: type: QUERY
330 POSTHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x
331 POSTHOOK: type: QUERY
332 Plan optimized by CBO.
333
334 Vertex dependency in root stage
335 Reducer 2 <- Map 1 (SIMPLE_EDGE)
336 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
337
338 Stage-0
339   Fetch Operator
340     limit:-1
341     Stage-1
342       Reducer 3 llap
343       File Output Operator [FS_12]
344         Select Operator [SEL_11] (rows=5 width=20)
345           Output:["_col0","_col1","_col2"]
346           Group By Operator [GBY_10] (rows=5 width=20)
347             Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
348           <-Reducer 2 [SIMPLE_EDGE] llap
349             SHUFFLE [RS_9]
350               PartitionCols:_col0, _col1
351               Group By Operator [GBY_8] (rows=5 width=20)
352                 Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col0, _col1
353                 Select Operator [SEL_5] (rows=10 width=101)
354                   Output:["_col0","_col1"]
355                   Group By Operator [GBY_4] (rows=10 width=101)
356                     Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
357                   <-Map 1 [SIMPLE_EDGE] llap
358                     SHUFFLE [RS_3]
359                       PartitionCols:_col0, _col1, _col2
360                       Group By Operator [GBY_2] (rows=10 width=101)
361                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
362                         Select Operator [SEL_1] (rows=20 width=88)
363                           Output:["key","c_int","c_float"]
364                           TableScan [TS_0] (rows=20 width=88)
365                             default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
366
367 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c
368 PREHOOK: type: QUERY
369 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c
370 POSTHOOK: type: QUERY
371 Plan optimized by CBO.
372
373 Vertex dependency in root stage
374 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
375 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
376 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
377 Reducer 6 <- Map 5 (SIMPLE_EDGE)
378 Reducer 8 <- Map 7 (SIMPLE_EDGE)
379
380 Stage-0
381   Fetch Operator
382     limit:-1
383     Stage-1
384       Reducer 4 llap
385       File Output Operator [FS_31]
386         Select Operator [SEL_29] (rows=1 width=20)
387           Output:["_col0","_col1","_col2"]
388         <-Reducer 3 [SIMPLE_EDGE] llap
389           SHUFFLE [RS_28]
390             Select Operator [SEL_27] (rows=1 width=28)
391               Output:["_col0","_col1","_col2","_col3"]
392               Group By Operator [GBY_26] (rows=1 width=20)
393                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
394               <-Reducer 2 [SIMPLE_EDGE] llap
395                 SHUFFLE [RS_25]
396                   PartitionCols:_col0, _col1
397                   Group By Operator [GBY_24] (rows=1 width=20)
398                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col4, _col1
399                     Select Operator [SEL_23] (rows=1 width=20)
400                       Output:["_col1","_col4"]
401                       Merge Join Operator [MERGEJOIN_41] (rows=1 width=20)
402                         Conds:RS_19._col0=RS_20._col0(Inner),RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 0)}
403                       <-Map 1 [SIMPLE_EDGE] llap
404                         SHUFFLE [RS_19]
405                           PartitionCols:_col0
406                           Select Operator [SEL_2] (rows=18 width=84)
407                             Output:["_col0","_col1"]
408                             Filter Operator [FIL_38] (rows=18 width=84)
409                               predicate:key is not null
410                               TableScan [TS_0] (rows=20 width=84)
411                                 default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
412                       <-Reducer 6 [SIMPLE_EDGE] llap
413                         SHUFFLE [RS_20]
414                           PartitionCols:_col0
415                           Select Operator [SEL_9] (rows=1 width=97)
416                             Output:["_col0","_col1","_col2"]
417                             Group By Operator [GBY_8] (rows=1 width=101)
418                               Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
419                             <-Map 5 [SIMPLE_EDGE] llap
420                               SHUFFLE [RS_7]
421                                 PartitionCols:_col0, _col1, _col2
422                                 Group By Operator [GBY_6] (rows=1 width=101)
423                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
424                                   Filter Operator [FIL_39] (rows=4 width=93)
425                                     predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and key is not null)
426                                     TableScan [TS_3] (rows=20 width=88)
427                                       default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
428                       <-Reducer 8 [SIMPLE_EDGE] llap
429                         SHUFFLE [RS_21]
430                           PartitionCols:_col0
431                           Select Operator [SEL_17] (rows=1 width=89)
432                             Output:["_col0","_col1"]
433                             Group By Operator [GBY_16] (rows=1 width=93)
434                               Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
435                             <-Map 7 [SIMPLE_EDGE] llap
436                               SHUFFLE [RS_15]
437                                 PartitionCols:_col0, _col1, _col2
438                                 Group By Operator [GBY_14] (rows=1 width=93)
439                                   Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
440                                   Filter Operator [FIL_40] (rows=4 width=93)
441                                     predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and key is not null)
442                                     TableScan [TS_11] (rows=20 width=88)
443                                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
444
445 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key  having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c  having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0  order by cbo_t3.c_int % c asc, cbo_t3.c_int desc
446 PREHOOK: type: QUERY
447 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key  having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c  having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0  order by cbo_t3.c_int % c asc, cbo_t3.c_int desc
448 POSTHOOK: type: QUERY
449 Plan optimized by CBO.
450
451 Vertex dependency in root stage
452 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
453 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
454 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
455 Reducer 6 <- Map 5 (SIMPLE_EDGE)
456 Reducer 8 <- Map 7 (SIMPLE_EDGE)
457
458 Stage-0
459   Fetch Operator
460     limit:-1
461     Stage-1
462       Reducer 4 llap
463       File Output Operator [FS_31]
464         Select Operator [SEL_29] (rows=1 width=20)
465           Output:["_col0","_col1","_col2"]
466         <-Reducer 3 [SIMPLE_EDGE] llap
467           SHUFFLE [RS_28]
468             Select Operator [SEL_27] (rows=1 width=28)
469               Output:["_col0","_col1","_col2","_col3"]
470               Group By Operator [GBY_26] (rows=1 width=20)
471                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
472               <-Reducer 2 [SIMPLE_EDGE] llap
473                 SHUFFLE [RS_25]
474                   PartitionCols:_col0, _col1
475                   Group By Operator [GBY_24] (rows=1 width=20)
476                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
477                     Select Operator [SEL_23] (rows=1 width=20)
478                       Output:["_col1","_col4"]
479                       Merge Join Operator [MERGEJOIN_41] (rows=1 width=20)
480                         Conds:RS_19._col0=RS_20._col0(Inner),RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col1 >= 1) or (_col4 >= 1L))} {((UDFToLong(_col1) + _col4) >= 0)} {((_col3 + _col6) >= 0)}
481                       <-Map 1 [SIMPLE_EDGE] llap
482                         SHUFFLE [RS_19]
483                           PartitionCols:_col0
484                           Select Operator [SEL_2] (rows=18 width=84)
485                             Output:["_col0","_col1"]
486                             Filter Operator [FIL_38] (rows=18 width=84)
487                               predicate:((c_int > 0) and key is not null)
488                               TableScan [TS_0] (rows=20 width=84)
489                                 default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
490                       <-Reducer 6 [SIMPLE_EDGE] llap
491                         SHUFFLE [RS_20]
492                           PartitionCols:_col0
493                           Select Operator [SEL_9] (rows=1 width=97)
494                             Output:["_col0","_col1","_col2"]
495                             Group By Operator [GBY_8] (rows=1 width=101)
496                               Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
497                             <-Map 5 [SIMPLE_EDGE] llap
498                               SHUFFLE [RS_7]
499                                 PartitionCols:_col0, _col1, _col2
500                                 Group By Operator [GBY_6] (rows=1 width=101)
501                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
502                                   Filter Operator [FIL_39] (rows=2 width=93)
503                                     predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
504                                     TableScan [TS_3] (rows=20 width=88)
505                                       default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
506                       <-Reducer 8 [SIMPLE_EDGE] llap
507                         SHUFFLE [RS_21]
508                           PartitionCols:_col0
509                           Select Operator [SEL_17] (rows=1 width=89)
510                             Output:["_col0","_col1"]
511                             Group By Operator [GBY_16] (rows=1 width=93)
512                               Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
513                             <-Map 7 [SIMPLE_EDGE] llap
514                               SHUFFLE [RS_15]
515                                 PartitionCols:_col0, _col1, _col2
516                                 Group By Operator [GBY_14] (rows=1 width=93)
517                                   Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
518                                   Filter Operator [FIL_40] (rows=2 width=93)
519                                     predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
520                                     TableScan [TS_11] (rows=20 width=88)
521                                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
522
523 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
524 PREHOOK: type: QUERY
525 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
526 POSTHOOK: type: QUERY
527 Plan optimized by CBO.
528
529 Vertex dependency in root stage
530 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
531 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
532 Reducer 5 <- Map 4 (SIMPLE_EDGE)
533 Reducer 7 <- Map 6 (SIMPLE_EDGE)
534
535 Stage-0
536   Fetch Operator
537     limit:-1
538     Stage-1
539       Reducer 3 llap
540       File Output Operator [FS_28]
541         Group By Operator [GBY_26] (rows=1 width=20)
542           Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
543         <-Reducer 2 [SIMPLE_EDGE] llap
544           SHUFFLE [RS_25]
545             PartitionCols:_col0, _col1
546             Group By Operator [GBY_24] (rows=1 width=20)
547               Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
548               Select Operator [SEL_23] (rows=1 width=20)
549                 Output:["_col1","_col4"]
550                 Merge Join Operator [MERGEJOIN_38] (rows=1 width=20)
551                   Conds:RS_19._col0=RS_20._col0(Inner),RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 2)}
552                 <-Map 1 [SIMPLE_EDGE] llap
553                   SHUFFLE [RS_19]
554                     PartitionCols:_col0
555                     Select Operator [SEL_2] (rows=18 width=84)
556                       Output:["_col0","_col1"]
557                       Filter Operator [FIL_35] (rows=18 width=84)
558                         predicate:key is not null
559                         TableScan [TS_0] (rows=20 width=84)
560                           default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
561                 <-Reducer 5 [SIMPLE_EDGE] llap
562                   SHUFFLE [RS_20]
563                     PartitionCols:_col0
564                     Select Operator [SEL_9] (rows=1 width=97)
565                       Output:["_col0","_col1","_col2"]
566                       Group By Operator [GBY_8] (rows=1 width=101)
567                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
568                       <-Map 4 [SIMPLE_EDGE] llap
569                         SHUFFLE [RS_7]
570                           PartitionCols:_col0, _col1, _col2
571                           Group By Operator [GBY_6] (rows=1 width=101)
572                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
573                             Filter Operator [FIL_36] (rows=2 width=93)
574                               predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
575                               TableScan [TS_3] (rows=20 width=88)
576                                 default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
577                 <-Reducer 7 [SIMPLE_EDGE] llap
578                   SHUFFLE [RS_21]
579                     PartitionCols:_col0
580                     Select Operator [SEL_17] (rows=1 width=89)
581                       Output:["_col0","_col1"]
582                       Group By Operator [GBY_16] (rows=1 width=93)
583                         Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
584                       <-Map 6 [SIMPLE_EDGE] llap
585                         SHUFFLE [RS_15]
586                           PartitionCols:_col0, _col1, _col2
587                           Group By Operator [GBY_14] (rows=1 width=93)
588                             Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
589                             Filter Operator [FIL_37] (rows=2 width=93)
590                               predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
591                               TableScan [TS_11] (rows=20 width=88)
592                                 default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
593
594 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int
595 PREHOOK: type: QUERY
596 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int
597 POSTHOOK: type: QUERY
598 Plan optimized by CBO.
599
600 Vertex dependency in root stage
601 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
602 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
603 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
604 Reducer 6 <- Map 5 (SIMPLE_EDGE)
605 Reducer 8 <- Map 7 (SIMPLE_EDGE)
606
607 Stage-0
608   Fetch Operator
609     limit:-1
610     Stage-1
611       Reducer 4 llap
612       File Output Operator [FS_30]
613         Select Operator [SEL_29] (rows=1 width=20)
614           Output:["_col0","_col1","_col2"]
615         <-Reducer 3 [SIMPLE_EDGE] llap
616           SHUFFLE [RS_28]
617             Group By Operator [GBY_26] (rows=1 width=20)
618               Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
619             <-Reducer 2 [SIMPLE_EDGE] llap
620               SHUFFLE [RS_25]
621                 PartitionCols:_col0, _col1
622                 Group By Operator [GBY_24] (rows=1 width=20)
623                   Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
624                   Select Operator [SEL_23] (rows=1 width=20)
625                     Output:["_col1","_col4"]
626                     Merge Join Operator [MERGEJOIN_40] (rows=1 width=20)
627                       Conds:RS_19._col0=RS_20._col0(Inner),RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col1 >= 1) or (_col4 >= 1L))} {((UDFToLong(_col1) + _col4) >= 0)} {((_col3 + _col6) >= 0)}
628                     <-Map 1 [SIMPLE_EDGE] llap
629                       SHUFFLE [RS_19]
630                         PartitionCols:_col0
631                         Select Operator [SEL_2] (rows=18 width=84)
632                           Output:["_col0","_col1"]
633                           Filter Operator [FIL_37] (rows=18 width=84)
634                             predicate:((c_int > 0) and key is not null)
635                             TableScan [TS_0] (rows=20 width=84)
636                               default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
637                     <-Reducer 6 [SIMPLE_EDGE] llap
638                       SHUFFLE [RS_20]
639                         PartitionCols:_col0
640                         Select Operator [SEL_9] (rows=1 width=97)
641                           Output:["_col0","_col1","_col2"]
642                           Group By Operator [GBY_8] (rows=1 width=101)
643                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
644                           <-Map 5 [SIMPLE_EDGE] llap
645                             SHUFFLE [RS_7]
646                               PartitionCols:_col0, _col1, _col2
647                               Group By Operator [GBY_6] (rows=1 width=101)
648                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
649                                 Filter Operator [FIL_38] (rows=2 width=93)
650                                   predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
651                                   TableScan [TS_3] (rows=20 width=88)
652                                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
653                     <-Reducer 8 [SIMPLE_EDGE] llap
654                       SHUFFLE [RS_21]
655                         PartitionCols:_col0
656                         Select Operator [SEL_17] (rows=1 width=89)
657                           Output:["_col0","_col1"]
658                           Group By Operator [GBY_16] (rows=1 width=93)
659                             Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
660                           <-Map 7 [SIMPLE_EDGE] llap
661                             SHUFFLE [RS_15]
662                               PartitionCols:_col0, _col1, _col2
663                               Group By Operator [GBY_14] (rows=1 width=93)
664                                 Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
665                                 Filter Operator [FIL_39] (rows=2 width=93)
666                                   predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
667                                   TableScan [TS_11] (rows=20 width=88)
668                                     default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
669
670 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
671 PREHOOK: type: QUERY
672 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
673 POSTHOOK: type: QUERY
674 Plan optimized by CBO.
675
676 Vertex dependency in root stage
677 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
678 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
679 Reducer 5 <- Map 4 (SIMPLE_EDGE)
680 Reducer 7 <- Map 6 (SIMPLE_EDGE)
681
682 Stage-0
683   Fetch Operator
684     limit:-1
685     Stage-1
686       Reducer 3 llap
687       File Output Operator [FS_28]
688         Group By Operator [GBY_26] (rows=1 width=20)
689           Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
690         <-Reducer 2 [SIMPLE_EDGE] llap
691           SHUFFLE [RS_25]
692             PartitionCols:_col0, _col1
693             Group By Operator [GBY_24] (rows=1 width=20)
694               Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
695               Select Operator [SEL_23] (rows=1 width=20)
696                 Output:["_col1","_col4"]
697                 Merge Join Operator [MERGEJOIN_38] (rows=1 width=20)
698                   Conds:RS_19._col0=RS_20._col0(Inner),RS_20._col0=RS_21._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 0)}
699                 <-Map 1 [SIMPLE_EDGE] llap
700                   SHUFFLE [RS_19]
701                     PartitionCols:_col0
702                     Select Operator [SEL_2] (rows=18 width=84)
703                       Output:["_col0","_col1"]
704                       Filter Operator [FIL_35] (rows=18 width=84)
705                         predicate:key is not null
706                         TableScan [TS_0] (rows=20 width=84)
707                           default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
708                 <-Reducer 5 [SIMPLE_EDGE] llap
709                   SHUFFLE [RS_20]
710                     PartitionCols:_col0
711                     Select Operator [SEL_9] (rows=1 width=97)
712                       Output:["_col0","_col1","_col2"]
713                       Group By Operator [GBY_8] (rows=1 width=101)
714                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
715                       <-Map 4 [SIMPLE_EDGE] llap
716                         SHUFFLE [RS_7]
717                           PartitionCols:_col0, _col1, _col2
718                           Group By Operator [GBY_6] (rows=1 width=101)
719                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
720                             Filter Operator [FIL_36] (rows=2 width=93)
721                               predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
722                               TableScan [TS_3] (rows=20 width=88)
723                                 default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
724                 <-Reducer 7 [SIMPLE_EDGE] llap
725                   SHUFFLE [RS_21]
726                     PartitionCols:_col0
727                     Select Operator [SEL_17] (rows=1 width=89)
728                       Output:["_col0","_col1"]
729                       Group By Operator [GBY_16] (rows=1 width=93)
730                         Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
731                       <-Map 6 [SIMPLE_EDGE] llap
732                         SHUFFLE [RS_15]
733                           PartitionCols:_col0, _col1, _col2
734                           Group By Operator [GBY_14] (rows=1 width=93)
735                             Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
736                             Filter Operator [FIL_37] (rows=2 width=93)
737                               predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (c_float > 0) and key is not null)
738                               TableScan [TS_11] (rows=20 width=88)
739                                 default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
740
741 PREHOOK: query: explain select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc
742 PREHOOK: type: QUERY
743 POSTHOOK: query: explain select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc
744 POSTHOOK: type: QUERY
745 Plan optimized by CBO.
746
747 Stage-0
748   Fetch Operator
749     limit:1
750
751 PREHOOK: query: explain select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1
752         UNION  ALL
753         select 'min' as key,  min(c_int) as value from cbo_t3 s2
754     UNION ALL
755         select 'avg' as key,  avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key
756 PREHOOK: type: QUERY
757 POSTHOOK: query: explain select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1
758         UNION  ALL
759         select 'min' as key,  min(c_int) as value from cbo_t3 s2
760     UNION ALL
761         select 'avg' as key,  avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key
762 POSTHOOK: type: QUERY
763 Plan optimized by CBO.
764
765 Vertex dependency in root stage
766 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
767 Reducer 4 <- Union 3 (SIMPLE_EDGE)
768 Reducer 6 <- Map 5 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
769 Reducer 8 <- Map 7 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
770
771 Stage-0
772   Fetch Operator
773     limit:-1
774     Stage-1
775       Reducer 4 llap
776       File Output Operator [FS_25]
777         Select Operator [SEL_24] (rows=3 width=87)
778           Output:["_col0"]
779         <-Union 3 [SIMPLE_EDGE]
780           <-Reducer 2 [CONTAINS] llap
781             Reduce Output Operator [RS_23]
782               Select Operator [SEL_5] (rows=1 width=87)
783                 Output:["_col0"]
784                 Group By Operator [GBY_4] (rows=1 width=8)
785                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
786                 <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
787                   PARTITION_ONLY_SHUFFLE [RS_3]
788                     Group By Operator [GBY_2] (rows=1 width=8)
789                       Output:["_col0"],aggregations:["count(key)"]
790                       Select Operator [SEL_1] (rows=20 width=80)
791                         Output:["key"]
792                         TableScan [TS_0] (rows=20 width=80)
793                           default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
794           <-Reducer 6 [CONTAINS] llap
795             Reduce Output Operator [RS_23]
796               Select Operator [SEL_12] (rows=1 width=87)
797                 Output:["_col0"]
798                 Group By Operator [GBY_11] (rows=1 width=8)
799                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
800                 <-Map 5 [CUSTOM_SIMPLE_EDGE] llap
801                   PARTITION_ONLY_SHUFFLE [RS_10]
802                     Group By Operator [GBY_9] (rows=1 width=8)
803                       Output:["_col0"],aggregations:["count(key)"]
804                       Select Operator [SEL_8] (rows=20 width=80)
805                         Output:["key"]
806                         TableScan [TS_7] (rows=20 width=80)
807                           default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
808           <-Reducer 8 [CONTAINS] llap
809             Reduce Output Operator [RS_23]
810               Select Operator [SEL_20] (rows=1 width=87)
811                 Output:["_col0"]
812                 Group By Operator [GBY_19] (rows=1 width=8)
813                   Output:["_col0"],aggregations:["count(VALUE._col0)"]
814                 <-Map 7 [CUSTOM_SIMPLE_EDGE] llap
815                   PARTITION_ONLY_SHUFFLE [RS_18]
816                     Group By Operator [GBY_17] (rows=1 width=8)
817                       Output:["_col0"],aggregations:["count(key)"]
818                       Select Operator [SEL_16] (rows=20 width=80)
819                         Output:["key"]
820                         TableScan [TS_15] (rows=20 width=80)
821                           default@cbo_t3,s3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
822
823 PREHOOK: query: explain select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1
824     UNION  ALL
825         select 'min' as key,  min(c_int) as value from cbo_t3 s2
826     UNION ALL
827         select 'avg' as key,  avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key
828 PREHOOK: type: QUERY
829 POSTHOOK: query: explain select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1
830     UNION  ALL
831         select 'min' as key,  min(c_int) as value from cbo_t3 s2
832     UNION ALL
833         select 'avg' as key,  avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key
834 POSTHOOK: type: QUERY
835 Plan optimized by CBO.
836
837 Vertex dependency in root stage
838 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
839 Reducer 4 <- Union 3 (SIMPLE_EDGE)
840 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
841 Reducer 7 <- Map 6 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
842 Reducer 9 <- Map 8 (CUSTOM_SIMPLE_EDGE), Union 3 (CONTAINS)
843
844 Stage-0
845   Fetch Operator
846     limit:-1
847     Stage-1
848       Reducer 5 llap
849       File Output Operator [FS_30]
850         Select Operator [SEL_29] (rows=1 width=95)
851           Output:["_col0","_col1"]
852         <-Reducer 4 [SIMPLE_EDGE] llap
853           SHUFFLE [RS_28]
854             Group By Operator [GBY_26] (rows=1 width=95)
855               Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
856             <-Union 3 [SIMPLE_EDGE]
857               <-Reducer 2 [CONTAINS] llap
858                 Reduce Output Operator [RS_25]
859                   PartitionCols:_col0
860                   Group By Operator [GBY_24] (rows=1 width=95)
861                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
862                     Select Operator [SEL_5] (rows=1 width=87)
863                       Output:["_col0"]
864                       Group By Operator [GBY_4] (rows=1 width=8)
865                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
866                       <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
867                         PARTITION_ONLY_SHUFFLE [RS_3]
868                           Group By Operator [GBY_2] (rows=1 width=8)
869                             Output:["_col0"],aggregations:["count(key)"]
870                             Select Operator [SEL_1] (rows=20 width=80)
871                               Output:["key"]
872                               TableScan [TS_0] (rows=20 width=80)
873                                 default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
874               <-Reducer 7 [CONTAINS] llap
875                 Reduce Output Operator [RS_25]
876                   PartitionCols:_col0
877                   Group By Operator [GBY_24] (rows=1 width=95)
878                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
879                     Select Operator [SEL_12] (rows=1 width=87)
880                       Output:["_col0"]
881                       Group By Operator [GBY_11] (rows=1 width=8)
882                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
883                       <-Map 6 [CUSTOM_SIMPLE_EDGE] llap
884                         PARTITION_ONLY_SHUFFLE [RS_10]
885                           Group By Operator [GBY_9] (rows=1 width=8)
886                             Output:["_col0"],aggregations:["count(key)"]
887                             Select Operator [SEL_8] (rows=20 width=80)
888                               Output:["key"]
889                               TableScan [TS_7] (rows=20 width=80)
890                                 default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
891               <-Reducer 9 [CONTAINS] llap
892                 Reduce Output Operator [RS_25]
893                   PartitionCols:_col0
894                   Group By Operator [GBY_24] (rows=1 width=95)
895                     Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
896                     Select Operator [SEL_20] (rows=1 width=87)
897                       Output:["_col0"]
898                       Group By Operator [GBY_19] (rows=1 width=8)
899                         Output:["_col0"],aggregations:["count(VALUE._col0)"]
900                       <-Map 8 [CUSTOM_SIMPLE_EDGE] llap
901                         PARTITION_ONLY_SHUFFLE [RS_18]
902                           Group By Operator [GBY_17] (rows=1 width=8)
903                             Output:["_col0"],aggregations:["count(key)"]
904                             Select Operator [SEL_16] (rows=20 width=80)
905                               Output:["key"]
906                               TableScan [TS_15] (rows=20 width=80)
907                                 default@cbo_t3,s3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
908
909 PREHOOK: query: explain select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1
910 PREHOOK: type: QUERY
911 POSTHOOK: query: explain select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1
912 POSTHOOK: type: QUERY
913 Plan optimized by CBO.
914
915 Vertex dependency in root stage
916 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
917
918 Stage-0
919   Fetch Operator
920     limit:-1
921     Stage-1
922       Reducer 2 llap
923       File Output Operator [FS_10]
924         Merge Join Operator [MERGEJOIN_15] (rows=18 width=85)
925           Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"]
926         <-Map 1 [SIMPLE_EDGE] llap
927           SHUFFLE [RS_6]
928             PartitionCols:_col0
929             Select Operator [SEL_2] (rows=6 width=85)
930               Output:["_col0"]
931               Filter Operator [FIL_13] (rows=6 width=85)
932                 predicate:(UDFToDouble(key) >= 1.0D)
933                 TableScan [TS_0] (rows=20 width=80)
934                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
935         <-Map 3 [SIMPLE_EDGE] llap
936           SHUFFLE [RS_7]
937             PartitionCols:_col0
938             Select Operator [SEL_5] (rows=6 width=85)
939               Output:["_col0"]
940               Filter Operator [FIL_14] (rows=6 width=85)
941                 predicate:(UDFToDouble(key) >= 1.0D)
942                 TableScan [TS_3] (rows=20 width=80)
943                   default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
944
945 PREHOOK: query: explain select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join  cbo_t2 on cbo_t1.key=cbo_t2.key
946 PREHOOK: type: QUERY
947 POSTHOOK: query: explain select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join  cbo_t2 on cbo_t1.key=cbo_t2.key
948 POSTHOOK: type: QUERY
949 Plan optimized by CBO.
950
951 Vertex dependency in root stage
952 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
953
954 Stage-0
955   Fetch Operator
956     limit:-1
957     Stage-1
958       Reducer 2 llap
959       File Output Operator [FS_8]
960         Select Operator [SEL_7] (rows=80 width=7)
961           Output:["_col0","_col1"]
962           Merge Join Operator [MERGEJOIN_11] (rows=80 width=7)
963             Conds:RS_4._col0=RS_5._col0(Left Outer),Output:["_col1","_col3"]
964           <-Map 1 [SIMPLE_EDGE] llap
965             SHUFFLE [RS_4]
966               PartitionCols:_col0
967               Select Operator [SEL_1] (rows=20 width=84)
968                 Output:["_col0","_col1"]
969                 TableScan [TS_0] (rows=20 width=84)
970                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
971           <-Map 3 [SIMPLE_EDGE] llap
972             SHUFFLE [RS_5]
973               PartitionCols:_col0
974               Select Operator [SEL_3] (rows=20 width=84)
975                 Output:["_col0","_col1"]
976                 TableScan [TS_2] (rows=20 width=84)
977                   default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
978
979 PREHOOK: query: explain select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join  cbo_t2 on cbo_t1.key=cbo_t2.key
980 PREHOOK: type: QUERY
981 POSTHOOK: query: explain select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join  cbo_t2 on cbo_t1.key=cbo_t2.key
982 POSTHOOK: type: QUERY
983 Plan optimized by CBO.
984
985 Vertex dependency in root stage
986 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
987
988 Stage-0
989   Fetch Operator
990     limit:-1
991     Stage-1
992       Reducer 2 llap
993       File Output Operator [FS_8]
994         Select Operator [SEL_7] (rows=80 width=7)
995           Output:["_col0","_col1"]
996           Merge Join Operator [MERGEJOIN_9] (rows=80 width=7)
997             Conds:RS_4._col0=RS_5._col0(Outer),Output:["_col1","_col3"]
998           <-Map 1 [SIMPLE_EDGE] llap
999             SHUFFLE [RS_4]
1000               PartitionCols:_col0
1001               Select Operator [SEL_1] (rows=20 width=84)
1002                 Output:["_col0","_col1"]
1003                 TableScan [TS_0] (rows=20 width=84)
1004                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1005           <-Map 3 [SIMPLE_EDGE] llap
1006             SHUFFLE [RS_5]
1007               PartitionCols:_col0
1008               Select Operator [SEL_3] (rows=20 width=84)
1009                 Output:["_col0","_col1"]
1010                 TableScan [TS_2] (rows=20 width=84)
1011                   default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1012
1013 PREHOOK: query: explain select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key
1014 PREHOOK: type: QUERY
1015 POSTHOOK: query: explain select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key
1016 POSTHOOK: type: QUERY
1017 Plan optimized by CBO.
1018
1019 Vertex dependency in root stage
1020 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
1021
1022 Stage-0
1023   Fetch Operator
1024     limit:-1
1025     Stage-1
1026       Reducer 2 llap
1027       File Output Operator [FS_14]
1028         Select Operator [SEL_13] (rows=194 width=100)
1029           Output:["_col0","_col1","_col2","_col3","_col4"]
1030           Merge Join Operator [MERGEJOIN_24] (rows=194 width=100)
1031             Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col4","_col5","_col6"]
1032           <-Map 1 [SIMPLE_EDGE] llap
1033             SHUFFLE [RS_9]
1034               PartitionCols:_col0
1035               Select Operator [SEL_2] (rows=18 width=87)
1036                 Output:["_col0","_col1","_col2"]
1037                 Filter Operator [FIL_21] (rows=18 width=87)
1038                   predicate:key is not null
1039                   TableScan [TS_0] (rows=20 width=88)
1040                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1041           <-Map 3 [SIMPLE_EDGE] llap
1042             SHUFFLE [RS_10]
1043               PartitionCols:_col0
1044               Select Operator [SEL_5] (rows=18 width=84)
1045                 Output:["_col0","_col1"]
1046                 Filter Operator [FIL_22] (rows=18 width=84)
1047                   predicate:key is not null
1048                   TableScan [TS_3] (rows=20 width=84)
1049                     default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1050           <-Map 4 [SIMPLE_EDGE] llap
1051             SHUFFLE [RS_11]
1052               PartitionCols:_col0
1053               Select Operator [SEL_8] (rows=18 width=84)
1054                 Output:["_col0","_col1"]
1055                 Filter Operator [FIL_23] (rows=18 width=84)
1056                   predicate:key is not null
1057                   TableScan [TS_6] (rows=20 width=84)
1058                     default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1059
1060 PREHOOK: query: explain select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a
1061 PREHOOK: type: QUERY
1062 POSTHOOK: query: explain select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a
1063 POSTHOOK: type: QUERY
1064 Plan optimized by CBO.
1065
1066 Vertex dependency in root stage
1067 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
1068
1069 Stage-0
1070   Fetch Operator
1071     limit:-1
1072     Stage-1
1073       Reducer 2 llap
1074       File Output Operator [FS_14]
1075         Select Operator [SEL_13] (rows=194 width=177)
1076           Output:["_col0","_col1","_col2","_col3"]
1077           Merge Join Operator [MERGEJOIN_24] (rows=194 width=177)
1078             Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col0","_col1","_col3","_col4"]
1079           <-Map 1 [SIMPLE_EDGE] llap
1080             SHUFFLE [RS_9]
1081               PartitionCols:_col0
1082               Select Operator [SEL_2] (rows=18 width=84)
1083                 Output:["_col0","_col1"]
1084                 Filter Operator [FIL_21] (rows=18 width=84)
1085                   predicate:key is not null
1086                   TableScan [TS_0] (rows=20 width=84)
1087                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1088           <-Map 3 [SIMPLE_EDGE] llap
1089             SHUFFLE [RS_10]
1090               PartitionCols:_col0
1091               Select Operator [SEL_5] (rows=18 width=80)
1092                 Output:["_col0"]
1093                 Filter Operator [FIL_22] (rows=18 width=80)
1094                   predicate:key is not null
1095                   TableScan [TS_3] (rows=20 width=80)
1096                     default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
1097           <-Map 4 [SIMPLE_EDGE] llap
1098             SHUFFLE [RS_11]
1099               PartitionCols:_col0
1100               Select Operator [SEL_8] (rows=18 width=84)
1101                 Output:["_col0","_col1"]
1102                 Filter Operator [FIL_23] (rows=18 width=84)
1103                   predicate:key is not null
1104                   TableScan [TS_6] (rows=20 width=84)
1105                     default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1106
1107 PREHOOK: query: explain select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where  (q + 1 = 2) and (R.b > 0 or c_int >= 0)
1108 PREHOOK: type: QUERY
1109 POSTHOOK: query: explain select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where  (q + 1 = 2) and (R.b > 0 or c_int >= 0)
1110 POSTHOOK: type: QUERY
1111 Plan optimized by CBO.
1112
1113 Vertex dependency in root stage
1114 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
1115
1116 Stage-0
1117   Fetch Operator
1118     limit:-1
1119     Stage-1
1120       Reducer 2 llap
1121       File Output Operator [FS_14]
1122         Select Operator [SEL_13] (rows=48 width=101)
1123           Output:["_col0","_col1","_col2","_col3","_col4"]
1124           Merge Join Operator [MERGEJOIN_24] (rows=48 width=101)
1125             Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"],residual filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or (_col6 >= 0))}
1126           <-Map 1 [SIMPLE_EDGE] llap
1127             SHUFFLE [RS_9]
1128               PartitionCols:_col0
1129               Select Operator [SEL_2] (rows=8 width=93)
1130                 Output:["_col0","_col1","_col2"]
1131                 Filter Operator [FIL_21] (rows=8 width=93)
1132                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1133                   TableScan [TS_0] (rows=20 width=88)
1134                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1135           <-Map 3 [SIMPLE_EDGE] llap
1136             SHUFFLE [RS_10]
1137               PartitionCols:_col0
1138               Select Operator [SEL_5] (rows=8 width=89)
1139                 Output:["_col0","_col1"]
1140                 Filter Operator [FIL_22] (rows=8 width=93)
1141                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1142                   TableScan [TS_3] (rows=20 width=88)
1143                     default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1144           <-Map 4 [SIMPLE_EDGE] llap
1145             SHUFFLE [RS_11]
1146               PartitionCols:_col0
1147               Select Operator [SEL_8] (rows=18 width=84)
1148                 Output:["_col0","_col1"]
1149                 Filter Operator [FIL_23] (rows=18 width=84)
1150                   predicate:key is not null
1151                   TableScan [TS_6] (rows=20 width=84)
1152                     default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1153
1154 PREHOOK: query: explain select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where  (q + 1 = 2) and (R.b > 0 or c_int >= 0)
1155 PREHOOK: type: QUERY
1156 POSTHOOK: query: explain select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where  (q + 1 = 2) and (R.b > 0 or c_int >= 0)
1157 POSTHOOK: type: QUERY
1158 Plan optimized by CBO.
1159
1160 Vertex dependency in root stage
1161 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
1162
1163 Stage-0
1164   Fetch Operator
1165     limit:-1
1166     Stage-1
1167       Reducer 2 llap
1168       File Output Operator [FS_14]
1169         Select Operator [SEL_13] (rows=48 width=101)
1170           Output:["_col0","_col1","_col2","_col3","_col4"]
1171           Merge Join Operator [MERGEJOIN_24] (rows=48 width=101)
1172             Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"],residual filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or (_col6 >= 0))}
1173           <-Map 1 [SIMPLE_EDGE] llap
1174             SHUFFLE [RS_9]
1175               PartitionCols:_col0
1176               Select Operator [SEL_2] (rows=8 width=93)
1177                 Output:["_col0","_col1","_col2"]
1178                 Filter Operator [FIL_21] (rows=8 width=93)
1179                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1180                   TableScan [TS_0] (rows=20 width=88)
1181                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1182           <-Map 3 [SIMPLE_EDGE] llap
1183             SHUFFLE [RS_10]
1184               PartitionCols:_col0
1185               Select Operator [SEL_5] (rows=8 width=89)
1186                 Output:["_col0","_col1"]
1187                 Filter Operator [FIL_22] (rows=8 width=93)
1188                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1189                   TableScan [TS_3] (rows=20 width=88)
1190                     default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1191           <-Map 4 [SIMPLE_EDGE] llap
1192             SHUFFLE [RS_11]
1193               PartitionCols:_col0
1194               Select Operator [SEL_8] (rows=18 width=84)
1195                 Output:["_col0","_col1"]
1196                 Filter Operator [FIL_23] (rows=18 width=84)
1197                   predicate:key is not null
1198                   TableScan [TS_6] (rows=20 width=84)
1199                     default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1200
1201 PREHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1
1202 PREHOOK: type: QUERY
1203 POSTHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1
1204 POSTHOOK: type: QUERY
1205 Plan optimized by CBO.
1206
1207 Vertex dependency in root stage
1208 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1209 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
1210
1211 Stage-0
1212   Fetch Operator
1213     limit:1
1214     Stage-1
1215       Reducer 3 llap
1216       File Output Operator [FS_10]
1217         Limit [LIM_9] (rows=1 width=97)
1218           Number of rows:1
1219           Select Operator [SEL_8] (rows=10 width=97)
1220             Output:["_col0","_col1","_col2"]
1221           <-Reducer 2 [SIMPLE_EDGE] llap
1222             SHUFFLE [RS_7]
1223               Select Operator [SEL_5] (rows=10 width=97)
1224                 Output:["_col0","_col1","_col2"]
1225                 Group By Operator [GBY_4] (rows=10 width=101)
1226                   Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
1227                 <-Map 1 [SIMPLE_EDGE] llap
1228                   SHUFFLE [RS_3]
1229                     PartitionCols:_col0, _col1, _col2
1230                     Group By Operator [GBY_2] (rows=10 width=101)
1231                       Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
1232                       Select Operator [SEL_1] (rows=20 width=88)
1233                         Output:["key","c_int","c_float"]
1234                         TableScan [TS_0] (rows=20 width=88)
1235                           default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1236
1237 PREHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1
1238 PREHOOK: type: QUERY
1239 POSTHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1
1240 POSTHOOK: type: QUERY
1241 Plan optimized by CBO.
1242
1243 Vertex dependency in root stage
1244 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1245 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
1246 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
1247
1248 Stage-0
1249   Fetch Operator
1250     limit:1
1251     Stage-1
1252       Reducer 4 llap
1253       File Output Operator [FS_15]
1254         Limit [LIM_14] (rows=1 width=20)
1255           Number of rows:1
1256           Select Operator [SEL_13] (rows=5 width=20)
1257             Output:["_col0","_col1","_col2"]
1258           <-Reducer 3 [SIMPLE_EDGE] llap
1259             SHUFFLE [RS_12]
1260               Group By Operator [GBY_10] (rows=5 width=20)
1261                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
1262               <-Reducer 2 [SIMPLE_EDGE] llap
1263                 SHUFFLE [RS_9]
1264                   PartitionCols:_col0, _col1
1265                   Group By Operator [GBY_8] (rows=5 width=20)
1266                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col0
1267                     Select Operator [SEL_5] (rows=10 width=101)
1268                       Output:["_col0","_col1"]
1269                       Group By Operator [GBY_4] (rows=10 width=101)
1270                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
1271                       <-Map 1 [SIMPLE_EDGE] llap
1272                         SHUFFLE [RS_3]
1273                           PartitionCols:_col0, _col1, _col2
1274                           Group By Operator [GBY_2] (rows=10 width=101)
1275                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
1276                             Select Operator [SEL_1] (rows=20 width=88)
1277                               Output:["key","c_int","c_float"]
1278                               TableScan [TS_0] (rows=20 width=88)
1279                                 default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1280
1281 PREHOOK: query: explain select key from(select key from (select key from cbo_t1 limit 5)cbo_t2  limit 5)cbo_t3  limit 5
1282 PREHOOK: type: QUERY
1283 POSTHOOK: query: explain select key from(select key from (select key from cbo_t1 limit 5)cbo_t2  limit 5)cbo_t3  limit 5
1284 POSTHOOK: type: QUERY
1285 Plan optimized by CBO.
1286
1287 Stage-0
1288   Fetch Operator
1289     limit:5
1290     Limit [LIM_2]
1291       Number of rows:5
1292       Select Operator [SEL_1]
1293         Output:["_col0"]
1294         TableScan [TS_0]
1295           Output:["key"]
1296
1297 PREHOOK: query: explain select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1  order by c_int limit 5)cbo_t2  order by c_int limit 5
1298 PREHOOK: type: QUERY
1299 POSTHOOK: query: explain select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1  order by c_int limit 5)cbo_t2  order by c_int limit 5
1300 POSTHOOK: type: QUERY
1301 Plan optimized by CBO.
1302
1303 Vertex dependency in root stage
1304 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1305 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
1306 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
1307
1308 Stage-0
1309   Fetch Operator
1310     limit:5
1311     Stage-1
1312       Reducer 4 llap
1313       File Output Operator [FS_13]
1314         Limit [LIM_12] (rows=5 width=89)
1315           Number of rows:5
1316           Select Operator [SEL_11] (rows=5 width=89)
1317             Output:["_col0","_col1"]
1318           <-Reducer 3 [SIMPLE_EDGE] llap
1319             SHUFFLE [RS_10]
1320               Limit [LIM_8] (rows=5 width=89)
1321                 Number of rows:5
1322                 Select Operator [SEL_7] (rows=5 width=89)
1323                   Output:["_col0","_col1"]
1324                 <-Reducer 2 [SIMPLE_EDGE] llap
1325                   SHUFFLE [RS_6]
1326                     Limit [LIM_4] (rows=5 width=89)
1327                       Number of rows:5
1328                       Select Operator [SEL_3] (rows=20 width=84)
1329                         Output:["_col0","_col1"]
1330                       <-Map 1 [SIMPLE_EDGE] llap
1331                         SHUFFLE [RS_2]
1332                           Select Operator [SEL_1] (rows=20 width=84)
1333                             Output:["_col0","_col1"]
1334                             TableScan [TS_0] (rows=20 width=84)
1335                               default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1336
1337 PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5
1338 PREHOOK: type: QUERY
1339 POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5
1340 POSTHOOK: type: QUERY
1341 Plan optimized by CBO.
1342
1343 Vertex dependency in root stage
1344 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1345 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
1346 Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
1347 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
1348 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
1349 Reducer 8 <- Map 7 (SIMPLE_EDGE)
1350 Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
1351
1352 Stage-0
1353   Fetch Operator
1354     limit:-1
1355     Stage-1
1356       Reducer 6 llap
1357       File Output Operator [FS_44]
1358         Limit [LIM_42] (rows=1 width=28)
1359           Number of rows:5
1360           Select Operator [SEL_41] (rows=1 width=28)
1361             Output:["_col0","_col1","_col2"]
1362           <-Reducer 5 [SIMPLE_EDGE] llap
1363             SHUFFLE [RS_40]
1364               Select Operator [SEL_39] (rows=1 width=28)
1365                 Output:["_col0","_col1","_col2","_col3"]
1366                 Group By Operator [GBY_38] (rows=1 width=20)
1367                   Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
1368                 <-Reducer 4 [SIMPLE_EDGE] llap
1369                   SHUFFLE [RS_37]
1370                     PartitionCols:_col0, _col1
1371                     Group By Operator [GBY_36] (rows=1 width=20)
1372                       Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col4, _col6
1373                       Select Operator [SEL_35] (rows=2 width=20)
1374                         Output:["_col4","_col6"]
1375                         Merge Join Operator [MERGEJOIN_56] (rows=2 width=20)
1376                           Conds:RS_31._col0=RS_32._col0(Inner),RS_32._col0=RS_33._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual filter predicates:{((_col3 + _col1) >= 0)} {((_col3 > 0) or (_col6 >= 0))}
1377                         <-Map 10 [SIMPLE_EDGE] llap
1378                           SHUFFLE [RS_33]
1379                             PartitionCols:_col0
1380                             Select Operator [SEL_30] (rows=18 width=84)
1381                               Output:["_col0","_col1"]
1382                               Filter Operator [FIL_55] (rows=18 width=84)
1383                                 predicate:key is not null
1384                                 TableScan [TS_28] (rows=20 width=84)
1385                                   default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"]
1386                         <-Reducer 3 [SIMPLE_EDGE] llap
1387                           SHUFFLE [RS_31]
1388                             PartitionCols:_col0
1389                             Filter Operator [FIL_12] (rows=2 width=105)
1390                               predicate:_col0 is not null
1391                               Limit [LIM_10] (rows=3 width=105)
1392                                 Number of rows:5
1393                                 Select Operator [SEL_9] (rows=3 width=105)
1394                                   Output:["_col0","_col1"]
1395                                 <-Reducer 2 [SIMPLE_EDGE] llap
1396                                   SHUFFLE [RS_8]
1397                                     Select Operator [SEL_6] (rows=3 width=105)
1398                                       Output:["_col0","_col1","_col2","_col3"]
1399                                       Group By Operator [GBY_5] (rows=3 width=101)
1400                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
1401                                       <-Map 1 [SIMPLE_EDGE] llap
1402                                         SHUFFLE [RS_4]
1403                                           PartitionCols:_col0, _col1, _col2
1404                                           Group By Operator [GBY_3] (rows=3 width=101)
1405                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
1406                                             Filter Operator [FIL_52] (rows=6 width=93)
1407                                               predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)))
1408                                               TableScan [TS_0] (rows=20 width=88)
1409                                                 default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1410                         <-Reducer 9 [SIMPLE_EDGE] llap
1411                           SHUFFLE [RS_32]
1412                             PartitionCols:_col0
1413                             Filter Operator [FIL_26] (rows=2 width=97)
1414                               predicate:_col0 is not null
1415                               Limit [LIM_24] (rows=3 width=97)
1416                                 Number of rows:5
1417                                 Select Operator [SEL_23] (rows=3 width=97)
1418                                   Output:["_col0","_col1","_col2"]
1419                                 <-Reducer 8 [SIMPLE_EDGE] llap
1420                                   SHUFFLE [RS_22]
1421                                     Select Operator [SEL_20] (rows=3 width=97)
1422                                       Output:["_col0","_col1","_col2"]
1423                                       Group By Operator [GBY_19] (rows=3 width=101)
1424                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
1425                                       <-Map 7 [SIMPLE_EDGE] llap
1426                                         SHUFFLE [RS_18]
1427                                           PartitionCols:_col0, _col1, _col2
1428                                           Group By Operator [GBY_17] (rows=3 width=101)
1429                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
1430                                             Filter Operator [FIL_54] (rows=6 width=93)
1431                                               predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)))
1432                                               TableScan [TS_14] (rows=20 width=88)
1433                                                 default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1434
1435 PREHOOK: query: explain select cbo_t1.c_int           from cbo_t1 left semi join   cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)
1436 PREHOOK: type: QUERY
1437 POSTHOOK: query: explain select cbo_t1.c_int           from cbo_t1 left semi join   cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)
1438 POSTHOOK: type: QUERY
1439 Plan optimized by CBO.
1440
1441 Vertex dependency in root stage
1442 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
1443
1444 Stage-0
1445   Fetch Operator
1446     limit:-1
1447     Stage-1
1448       Reducer 2 llap
1449       File Output Operator [FS_12]
1450         Select Operator [SEL_11] (rows=8 width=4)
1451           Output:["_col0"]
1452           Merge Join Operator [MERGEJOIN_17] (rows=8 width=4)
1453             Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col1"]
1454           <-Map 1 [SIMPLE_EDGE] llap
1455             SHUFFLE [RS_8]
1456               PartitionCols:_col0
1457               Select Operator [SEL_2] (rows=8 width=93)
1458                 Output:["_col0","_col1"]
1459                 Filter Operator [FIL_15] (rows=8 width=93)
1460                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1461                   TableScan [TS_0] (rows=20 width=88)
1462                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1463           <-Map 3 [SIMPLE_EDGE] llap
1464             SHUFFLE [RS_9]
1465               PartitionCols:_col0
1466               Group By Operator [GBY_7] (rows=6 width=85)
1467                 Output:["_col0"],keys:_col0
1468                 Select Operator [SEL_5] (rows=18 width=80)
1469                   Output:["_col0"]
1470                   Filter Operator [FIL_16] (rows=18 width=80)
1471                     predicate:key is not null
1472                     TableScan [TS_3] (rows=20 width=80)
1473                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
1474
1475 PREHOOK: query: explain select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where  (b + 1 = 2) and (R.b > 0 or c >= 0)
1476 PREHOOK: type: QUERY
1477 POSTHOOK: query: explain select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where  (b + 1 = 2) and (R.b > 0 or c >= 0)
1478 POSTHOOK: type: QUERY
1479 Plan optimized by CBO.
1480
1481 Vertex dependency in root stage
1482 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
1483
1484 Stage-0
1485   Fetch Operator
1486     limit:-1
1487     Stage-1
1488       Reducer 2 llap
1489       File Output Operator [FS_18]
1490         Select Operator [SEL_17] (rows=14 width=93)
1491           Output:["_col0","_col1","_col2"]
1492           Merge Join Operator [MERGEJOIN_28] (rows=14 width=93)
1493             Conds:RS_13._col0=RS_14._col0(Left Semi),RS_13._col0=RS_15._col0(Left Semi),Output:["_col0","_col1","_col2"]
1494           <-Map 1 [SIMPLE_EDGE] llap
1495             SHUFFLE [RS_13]
1496               PartitionCols:_col0
1497               Select Operator [SEL_2] (rows=8 width=93)
1498                 Output:["_col0","_col1","_col2"]
1499                 Filter Operator [FIL_25] (rows=8 width=93)
1500                   predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1501                   TableScan [TS_0] (rows=20 width=88)
1502                     default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1503           <-Map 3 [SIMPLE_EDGE] llap
1504             SHUFFLE [RS_14]
1505               PartitionCols:_col0
1506               Group By Operator [GBY_10] (rows=3 width=85)
1507                 Output:["_col0"],keys:_col0
1508                 Select Operator [SEL_5] (rows=8 width=85)
1509                   Output:["_col0"]
1510                   Filter Operator [FIL_26] (rows=8 width=93)
1511                     predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null)
1512                     TableScan [TS_3] (rows=20 width=88)
1513                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1514           <-Map 4 [SIMPLE_EDGE] llap
1515             SHUFFLE [RS_15]
1516               PartitionCols:_col0
1517               Group By Operator [GBY_12] (rows=7 width=85)
1518                 Output:["_col0"],keys:_col0
1519                 Select Operator [SEL_8] (rows=18 width=80)
1520                   Output:["_col0"]
1521                   Filter Operator [FIL_27] (rows=18 width=80)
1522                     predicate:key is not null
1523                     TableScan [TS_6] (rows=20 width=80)
1524                       default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
1525
1526 PREHOOK: query: explain select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1  >= 0) and (b > 0 or a >= 0) group by a, c  having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a
1527 PREHOOK: type: QUERY
1528 POSTHOOK: query: explain select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1  >= 0) and (b > 0 or a >= 0) group by a, c  having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a
1529 POSTHOOK: type: QUERY
1530 Plan optimized by CBO.
1531
1532 Vertex dependency in root stage
1533 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1534 Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
1535 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
1536 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
1537 Reducer 7 <- Map 6 (SIMPLE_EDGE)
1538
1539 Stage-0
1540   Fetch Operator
1541     limit:-1
1542     Stage-1
1543       Reducer 5 llap
1544       File Output Operator [FS_35]
1545         Select Operator [SEL_34] (rows=1 width=101)
1546           Output:["_col0","_col1","_col2"]
1547         <-Reducer 4 [SIMPLE_EDGE] llap
1548           SHUFFLE [RS_33]
1549             Select Operator [SEL_32] (rows=1 width=101)
1550               Output:["_col0","_col1","_col2"]
1551               Group By Operator [GBY_31] (rows=1 width=101)
1552                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
1553               <-Reducer 3 [SIMPLE_EDGE] llap
1554                 SHUFFLE [RS_30]
1555                   PartitionCols:_col0, _col1
1556                   Group By Operator [GBY_29] (rows=1 width=101)
1557                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col0
1558                     Merge Join Operator [MERGEJOIN_45] (rows=1 width=93)
1559                       Conds:RS_24._col0=RS_25._col0(Left Semi),RS_24._col0=RS_26._col0(Left Semi),Output:["_col0","_col1"]
1560                     <-Map 8 [SIMPLE_EDGE] llap
1561                       SHUFFLE [RS_26]
1562                         PartitionCols:_col0
1563                         Group By Operator [GBY_23] (rows=3 width=85)
1564                           Output:["_col0"],keys:_col0
1565                           Select Operator [SEL_19] (rows=6 width=85)
1566                             Output:["_col0"]
1567                             Filter Operator [FIL_44] (rows=6 width=85)
1568                               predicate:(UDFToDouble(key) > 0.0D)
1569                               TableScan [TS_17] (rows=20 width=80)
1570                                 default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
1571                     <-Reducer 2 [SIMPLE_EDGE] llap
1572                       SHUFFLE [RS_24]
1573                         PartitionCols:_col0
1574                         Select Operator [SEL_8] (rows=1 width=93)
1575                           Output:["_col0","_col1"]
1576                           Filter Operator [FIL_7] (rows=1 width=101)
1577                             predicate:(((UDFToDouble(_col2) + UDFToDouble(_col3)) >= 0.0D) and ((UDFToDouble(_col2) >= 1.0D) or (_col3 >= 1L)))
1578                             Select Operator [SEL_6] (rows=1 width=101)
1579                               Output:["_col2","_col3"]
1580                               Group By Operator [GBY_5] (rows=1 width=101)
1581                                 Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
1582                               <-Map 1 [SIMPLE_EDGE] llap
1583                                 SHUFFLE [RS_4]
1584                                   PartitionCols:_col0, _col1, _col2
1585                                   Group By Operator [GBY_3] (rows=1 width=101)
1586                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float
1587                                     Filter Operator [FIL_42] (rows=1 width=93)
1588                                       predicate:((((c_int + 1) + 1) >= 0) and (((c_int + 1) > 0) or (UDFToDouble(key) >= 0.0D)) and ((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (UDFToDouble(key) > 0.0D) and (c_float > 0))
1589                                       TableScan [TS_0] (rows=20 width=88)
1590                                         default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1591                     <-Reducer 7 [SIMPLE_EDGE] llap
1592                       SHUFFLE [RS_25]
1593                         PartitionCols:_col0
1594                         Group By Operator [GBY_21] (rows=1 width=85)
1595                           Output:["_col0"],keys:_col0
1596                           Select Operator [SEL_15] (rows=1 width=85)
1597                             Output:["_col0"]
1598                             Group By Operator [GBY_14] (rows=1 width=93)
1599                               Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
1600                             <-Map 6 [SIMPLE_EDGE] llap
1601                               SHUFFLE [RS_13]
1602                                 PartitionCols:_col0, _col1, _col2
1603                                 Group By Operator [GBY_12] (rows=1 width=93)
1604                                   Output:["_col0","_col1","_col2"],keys:key, c_int, c_float
1605                                   Filter Operator [FIL_43] (rows=1 width=93)
1606                                     predicate:(((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and ((c_int >= 1) or (c_float >= 1)) and (UDFToDouble(key) > 0.0D) and (c_float > 0))
1607                                     TableScan [TS_9] (rows=20 width=88)
1608                                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
1609
1610 PREHOOK: query: explain select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1
1611 PREHOOK: type: QUERY
1612 POSTHOOK: query: explain select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1
1613 POSTHOOK: type: QUERY
1614 Plan optimized by CBO.
1615
1616 Stage-0
1617   Fetch Operator
1618     limit:-1
1619     Select Operator [SEL_1]
1620       Output:["_col0","_col1","_col2"]
1621       TableScan [TS_0]
1622         Output:["key","c_int","c_float"]
1623
1624 PREHOOK: query: explain select null from cbo_t1
1625 PREHOOK: type: QUERY
1626 POSTHOOK: query: explain select null from cbo_t1
1627 POSTHOOK: type: QUERY
1628 Plan optimized by CBO.
1629
1630 Stage-0
1631   Fetch Operator
1632     limit:-1
1633     Select Operator [SEL_1]
1634       Output:["_col0"]
1635       TableScan [TS_0]
1636
1637 PREHOOK: query: explain select key from cbo_t1 where c_int = -6  or c_int = +6
1638 PREHOOK: type: QUERY
1639 POSTHOOK: query: explain select key from cbo_t1 where c_int = -6  or c_int = +6
1640 POSTHOOK: type: QUERY
1641 Plan optimized by CBO.
1642
1643 Stage-0
1644   Fetch Operator
1645     limit:-1
1646     Select Operator [SEL_2]
1647       Output:["_col0"]
1648       Filter Operator [FIL_4]
1649         predicate:((c_int = -6) or (c_int = 6))
1650         TableScan [TS_0]
1651           Output:["key","c_int"]
1652
1653 PREHOOK: query: explain select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt  = cbo_t2.dt  where cbo_t1.dt = '2014'
1654 PREHOOK: type: QUERY
1655 POSTHOOK: query: explain select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt  = cbo_t2.dt  where cbo_t1.dt = '2014'
1656 POSTHOOK: type: QUERY
1657 Plan optimized by CBO.
1658
1659 Vertex dependency in root stage
1660 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 4 (CUSTOM_SIMPLE_EDGE)
1661 Reducer 3 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
1662
1663 Stage-0
1664   Fetch Operator
1665     limit:-1
1666     Stage-1
1667       Reducer 3 llap
1668       File Output Operator [FS_15]
1669         Group By Operator [GBY_13] (rows=1 width=8)
1670           Output:["_col0"],aggregations:["count(VALUE._col0)"]
1671         <-Reducer 2 [CUSTOM_SIMPLE_EDGE] llap
1672           PARTITION_ONLY_SHUFFLE [RS_12]
1673             Group By Operator [GBY_11] (rows=1 width=8)
1674               Output:["_col0"],aggregations:["count('2014')"]
1675               Merge Join Operator [MERGEJOIN_18] (rows=400 width=8)
1676                 Conds:(Inner)
1677               <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
1678                 PARTITION_ONLY_SHUFFLE [RS_6]
1679                   Select Operator [SEL_2] (rows=20 width=88)
1680                     TableScan [TS_0] (rows=20 width=21)
1681                       default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE
1682               <-Map 4 [CUSTOM_SIMPLE_EDGE] llap
1683                 PARTITION_ONLY_SHUFFLE [RS_7]
1684                   Select Operator [SEL_5] (rows=20 width=88)
1685                     TableScan [TS_3] (rows=20 width=21)
1686                       default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE
1687
1688 PREHOOK: query: explain select * 
1689 from src_cbo b 
1690 where not exists 
1691   (select distinct a.key 
1692   from src_cbo a 
1693   where b.value = a.value and a.value > 'val_2'
1694   )
1695 PREHOOK: type: QUERY
1696 POSTHOOK: query: explain select * 
1697 from src_cbo b 
1698 where not exists 
1699   (select distinct a.key 
1700   from src_cbo a 
1701   where b.value = a.value and a.value > 'val_2'
1702   )
1703 POSTHOOK: type: QUERY
1704 Plan optimized by CBO.
1705
1706 Vertex dependency in root stage
1707 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
1708 Reducer 3 <- Map 1 (SIMPLE_EDGE)
1709
1710 Stage-0
1711   Fetch Operator
1712     limit:-1
1713     Stage-1
1714       Reducer 2 llap
1715       File Output Operator [FS_19]
1716         Select Operator [SEL_18] (rows=366 width=178)
1717           Output:["_col0","_col1"]
1718           Filter Operator [FIL_17] (rows=366 width=179)
1719             predicate:_col3 is null
1720             Merge Join Operator [MERGEJOIN_22] (rows=500 width=179)
1721               Conds:RS_14._col1=RS_15._col0(Left Outer),Output:["_col0","_col1","_col3"]
1722             <-Map 1 [SIMPLE_EDGE] llap
1723               SHUFFLE [RS_14]
1724                 PartitionCols:_col1
1725                 Select Operator [SEL_1] (rows=500 width=178)
1726                   Output:["_col0","_col1"]
1727                   TableScan [TS_0] (rows=500 width=178)
1728                     default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1729             <-Reducer 3 [SIMPLE_EDGE] llap
1730               SHUFFLE [RS_15]
1731                 PartitionCols:_col0
1732                 Select Operator [SEL_13] (rows=83 width=95)
1733                   Output:["_col0","_col1"]
1734                   Group By Operator [GBY_12] (rows=83 width=91)
1735                     Output:["_col0"],keys:_col1
1736                     Select Operator [SEL_8] (rows=83 width=178)
1737                       Output:["_col1"]
1738                       Group By Operator [GBY_7] (rows=83 width=178)
1739                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
1740                       <-Map 1 [SIMPLE_EDGE] llap
1741                         SHUFFLE [RS_6]
1742                           PartitionCols:_col0
1743                           Group By Operator [GBY_5] (rows=83 width=178)
1744                             Output:["_col0","_col1"],keys:value, key
1745                             Filter Operator [FIL_21] (rows=166 width=178)
1746                               predicate:(value > 'val_2')
1747                                Please refer to the previous TableScan [TS_0]
1748
1749 PREHOOK: query: explain select * 
1750 from src_cbo b 
1751 group by key, value
1752 having not exists 
1753   (select a.key 
1754   from src_cbo a 
1755   where b.value = a.value  and a.key = b.key and a.value > 'val_12'
1756   )
1757 PREHOOK: type: QUERY
1758 POSTHOOK: query: explain select * 
1759 from src_cbo b 
1760 group by key, value
1761 having not exists 
1762   (select a.key 
1763   from src_cbo a 
1764   where b.value = a.value  and a.key = b.key and a.value > 'val_12'
1765   )
1766 POSTHOOK: type: QUERY
1767 Plan optimized by CBO.
1768
1769 Vertex dependency in root stage
1770 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1771 Reducer 3 <- Reducer 2 (ONE_TO_ONE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
1772 Reducer 4 <- Map 1 (SIMPLE_EDGE)
1773
1774 Stage-0
1775   Fetch Operator
1776     limit:-1
1777     Stage-1
1778       Reducer 3 llap
1779       File Output Operator [FS_18]
1780         Select Operator [SEL_17] (rows=183 width=178)
1781           Output:["_col0","_col1"]
1782           Filter Operator [FIL_16] (rows=183 width=179)
1783             predicate:_col4 is null
1784             Merge Join Operator [MERGEJOIN_21] (rows=250 width=179)
1785               Conds:RS_13._col0, _col1=RS_14._col0, _col1(Left Outer),Output:["_col0","_col1","_col4"]
1786             <-Reducer 2 [ONE_TO_ONE_EDGE] llap
1787               FORWARD [RS_13]
1788                 PartitionCols:_col0, _col1
1789                 Group By Operator [GBY_4] (rows=250 width=178)
1790                   Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
1791                 <-Map 1 [SIMPLE_EDGE] llap
1792                   SHUFFLE [RS_3]
1793                     PartitionCols:_col0, _col1
1794                     Group By Operator [GBY_2] (rows=250 width=178)
1795                       Output:["_col0","_col1"],keys:key, value
1796                       Select Operator [SEL_1] (rows=500 width=178)
1797                         Output:["key","value"]
1798                         TableScan [TS_0] (rows=500 width=178)
1799                           default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1800             <-Reducer 4 [ONE_TO_ONE_EDGE] llap
1801               FORWARD [RS_14]
1802                 PartitionCols:_col0, _col1
1803                 Select Operator [SEL_12] (rows=83 width=182)
1804                   Output:["_col0","_col1","_col2"]
1805                   Group By Operator [GBY_11] (rows=83 width=178)
1806                     Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
1807                   <-Map 1 [SIMPLE_EDGE] llap
1808                     SHUFFLE [RS_10]
1809                       PartitionCols:_col0, _col1
1810                       Group By Operator [GBY_9] (rows=83 width=178)
1811                         Output:["_col0","_col1"],keys:key, value
1812                         Filter Operator [FIL_20] (rows=166 width=178)
1813                           predicate:((value > 'val_12') and key is not null)
1814                            Please refer to the previous TableScan [TS_0]
1815
1816 PREHOOK: query: create view cv1 as 
1817 select * 
1818 from src_cbo b 
1819 where exists
1820   (select a.key 
1821   from src_cbo a 
1822   where b.value = a.value  and a.key = b.key and a.value > 'val_9')
1823 PREHOOK: type: CREATEVIEW
1824 PREHOOK: Input: default@src_cbo
1825 PREHOOK: Output: database:default
1826 PREHOOK: Output: default@cv1
1827 POSTHOOK: query: create view cv1 as 
1828 select * 
1829 from src_cbo b 
1830 where exists
1831   (select a.key 
1832   from src_cbo a 
1833   where b.value = a.value  and a.key = b.key and a.value > 'val_9')
1834 POSTHOOK: type: CREATEVIEW
1835 POSTHOOK: Input: default@src_cbo
1836 POSTHOOK: Output: database:default
1837 POSTHOOK: Output: default@cv1
1838 POSTHOOK: Lineage: cv1.key SIMPLE [(src_cbo)b.FieldSchema(name:key, type:string, comment:null), ]
1839 POSTHOOK: Lineage: cv1.value SIMPLE [(src_cbo)b.FieldSchema(name:value, type:string, comment:null), ]
1840 PREHOOK: query: explain select * from cv1
1841 PREHOOK: type: QUERY
1842 POSTHOOK: query: explain select * from cv1
1843 POSTHOOK: type: QUERY
1844 Plan optimized by CBO.
1845
1846 Vertex dependency in root stage
1847 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
1848
1849 Stage-0
1850   Fetch Operator
1851     limit:-1
1852     Stage-1
1853       Reducer 2 llap
1854       File Output Operator [FS_12]
1855         Merge Join Operator [MERGEJOIN_17] (rows=133 width=178)
1856           Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"]
1857         <-Map 1 [SIMPLE_EDGE] llap
1858           SHUFFLE [RS_8]
1859             PartitionCols:_col0, _col1
1860             Select Operator [SEL_2] (rows=166 width=178)
1861               Output:["_col0","_col1"]
1862               Filter Operator [FIL_15] (rows=166 width=178)
1863                 predicate:((value > 'val_9') and key is not null)
1864                 TableScan [TS_0] (rows=500 width=178)
1865                   default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"],properties:{"insideView":"TRUE"}
1866         <-Map 3 [SIMPLE_EDGE] llap
1867           SHUFFLE [RS_9]
1868             PartitionCols:_col0, _col1
1869             Group By Operator [GBY_7] (rows=83 width=178)
1870               Output:["_col0","_col1"],keys:_col0, _col1
1871               Select Operator [SEL_5] (rows=166 width=178)
1872                 Output:["_col0","_col1"]
1873                 Filter Operator [FIL_16] (rows=166 width=178)
1874                   predicate:((value > 'val_9') and key is not null)
1875                   TableScan [TS_3] (rows=500 width=178)
1876                     default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1877
1878 PREHOOK: query: explain select * 
1879 from (select * 
1880       from src_cbo b 
1881       where exists 
1882           (select a.key 
1883           from src_cbo a 
1884           where b.value = a.value  and a.key = b.key and a.value > 'val_9')
1885      ) a
1886 PREHOOK: type: QUERY
1887 POSTHOOK: query: explain select * 
1888 from (select * 
1889       from src_cbo b 
1890       where exists 
1891           (select a.key 
1892           from src_cbo a 
1893           where b.value = a.value  and a.key = b.key and a.value > 'val_9')
1894      ) a
1895 POSTHOOK: type: QUERY
1896 Plan optimized by CBO.
1897
1898 Vertex dependency in root stage
1899 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
1900
1901 Stage-0
1902   Fetch Operator
1903     limit:-1
1904     Stage-1
1905       Reducer 2 llap
1906       File Output Operator [FS_12]
1907         Merge Join Operator [MERGEJOIN_17] (rows=133 width=178)
1908           Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"]
1909         <-Map 1 [SIMPLE_EDGE] llap
1910           SHUFFLE [RS_8]
1911             PartitionCols:_col0, _col1
1912             Select Operator [SEL_2] (rows=166 width=178)
1913               Output:["_col0","_col1"]
1914               Filter Operator [FIL_15] (rows=166 width=178)
1915                 predicate:((value > 'val_9') and key is not null)
1916                 TableScan [TS_0] (rows=500 width=178)
1917                   default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1918         <-Map 3 [SIMPLE_EDGE] llap
1919           SHUFFLE [RS_9]
1920             PartitionCols:_col0, _col1
1921             Group By Operator [GBY_7] (rows=83 width=178)
1922               Output:["_col0","_col1"],keys:_col0, _col1
1923               Select Operator [SEL_5] (rows=166 width=178)
1924                 Output:["_col0","_col1"]
1925                 Filter Operator [FIL_16] (rows=166 width=178)
1926                   predicate:((value > 'val_9') and key is not null)
1927                   TableScan [TS_3] (rows=500 width=178)
1928                     default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1929
1930 PREHOOK: query: explain select * 
1931 from src_cbo 
1932 where src_cbo.key in (select key from src_cbo s1 where s1.key > '9')
1933 PREHOOK: type: QUERY
1934 POSTHOOK: query: explain select * 
1935 from src_cbo 
1936 where src_cbo.key in (select key from src_cbo s1 where s1.key > '9')
1937 POSTHOOK: type: QUERY
1938 Plan optimized by CBO.
1939
1940 Vertex dependency in root stage
1941 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
1942
1943 Stage-0
1944   Fetch Operator
1945     limit:-1
1946     Stage-1
1947       Reducer 2 llap
1948       File Output Operator [FS_12]
1949         Merge Join Operator [MERGEJOIN_17] (rows=133 width=178)
1950           Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0","_col1"]
1951         <-Map 1 [SIMPLE_EDGE] llap
1952           SHUFFLE [RS_8]
1953             PartitionCols:_col0
1954             Select Operator [SEL_2] (rows=166 width=178)
1955               Output:["_col0","_col1"]
1956               Filter Operator [FIL_15] (rows=166 width=178)
1957                 predicate:(key > '9')
1958                 TableScan [TS_0] (rows=500 width=178)
1959                   default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
1960         <-Map 3 [SIMPLE_EDGE] llap
1961           SHUFFLE [RS_9]
1962             PartitionCols:_col0
1963             Group By Operator [GBY_7] (rows=83 width=87)
1964               Output:["_col0"],keys:_col0
1965               Select Operator [SEL_5] (rows=166 width=87)
1966                 Output:["_col0"]
1967                 Filter Operator [FIL_16] (rows=166 width=87)
1968                   predicate:(key > '9')
1969                   TableScan [TS_3] (rows=500 width=87)
1970                     default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
1971
1972 PREHOOK: query: explain select p.p_partkey, li.l_suppkey 
1973 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
1974 where li.l_linenumber = 1 and
1975  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber)
1976 PREHOOK: type: QUERY
1977 POSTHOOK: query: explain select p.p_partkey, li.l_suppkey 
1978 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
1979 where li.l_linenumber = 1 and
1980  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber)
1981 POSTHOOK: type: QUERY
1982 Plan optimized by CBO.
1983
1984 Vertex dependency in root stage
1985 Reducer 2 <- Map 1 (SIMPLE_EDGE)
1986 Reducer 3 <- Map 5 (SIMPLE_EDGE), Reducer 2 (ONE_TO_ONE_EDGE)
1987 Reducer 4 <- Map 6 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
1988
1989 Stage-0
1990   Fetch Operator
1991     limit:-1
1992     Stage-1
1993       Reducer 4 llap
1994       File Output Operator [FS_22]
1995         Select Operator [SEL_21] (rows=3 width=8)
1996           Output:["_col0","_col1"]
1997           Merge Join Operator [MERGEJOIN_32] (rows=3 width=8)
1998             Conds:RS_18._col1, _col4=RS_19._col0, _col1(Left Semi),Output:["_col0","_col3"]
1999           <-Map 6 [SIMPLE_EDGE] llap
2000             SHUFFLE [RS_19]
2001               PartitionCols:_col0, _col1
2002               Group By Operator [GBY_17] (rows=1 width=8)
2003                 Output:["_col0","_col1"],keys:_col0, _col1
2004                 Select Operator [SEL_12] (rows=2 width=8)
2005                   Output:["_col0","_col1"]
2006                   Filter Operator [FIL_30] (rows=2 width=96)
2007                     predicate:((l_linenumber = 1) and (l_shipmode = 'AIR') and l_orderkey is not null)
2008                     TableScan [TS_10] (rows=100 width=96)
2009                       default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_linenumber","l_shipmode"]
2010           <-Reducer 3 [SIMPLE_EDGE] llap
2011             SHUFFLE [RS_18]
2012               PartitionCols:_col1, _col4
2013               Merge Join Operator [MERGEJOIN_31] (rows=7 width=16)
2014                 Conds:RS_13._col0=RS_14._col1(Inner),Output:["_col0","_col1","_col3","_col4"]
2015               <-Map 5 [SIMPLE_EDGE] llap
2016                 SHUFFLE [RS_14]
2017                   PartitionCols:_col1
2018                   Select Operator [SEL_9] (rows=14 width=16)
2019                     Output:["_col0","_col1","_col2","_col3"]
2020                     Filter Operator [FIL_29] (rows=14 width=16)
2021                       predicate:((l_linenumber = 1) and l_orderkey is not null and l_partkey is not null)
2022                       TableScan [TS_7] (rows=100 width=16)
2023                         default@lineitem,li,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_partkey","l_suppkey","l_linenumber"]
2024               <-Reducer 2 [ONE_TO_ONE_EDGE] llap
2025                 FORWARD [RS_13]
2026                   PartitionCols:_col0
2027                   Group By Operator [GBY_5] (rows=50 width=4)
2028                     Output:["_col0"],keys:KEY._col0
2029                   <-Map 1 [SIMPLE_EDGE] llap
2030                     SHUFFLE [RS_4]
2031                       PartitionCols:_col0
2032                       Group By Operator [GBY_3] (rows=50 width=4)
2033                         Output:["_col0"],keys:l_partkey
2034                         Filter Operator [FIL_28] (rows=100 width=4)
2035                           predicate:l_partkey is not null
2036                           TableScan [TS_0] (rows=100 width=4)
2037                             default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_partkey"]
2038
2039 PREHOOK: query: explain select key, value, count(*) 
2040 from src_cbo b
2041 where b.key in (select key from src_cbo where src_cbo.key > '8')
2042 group by key, value
2043 having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key )
2044 PREHOOK: type: QUERY
2045 POSTHOOK: query: explain select key, value, count(*) 
2046 from src_cbo b
2047 where b.key in (select key from src_cbo where src_cbo.key > '8')
2048 group by key, value
2049 having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key )
2050 POSTHOOK: type: QUERY
2051 Plan optimized by CBO.
2052
2053 Vertex dependency in root stage
2054 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
2055 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
2056 Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
2057 Reducer 6 <- Map 5 (SIMPLE_EDGE)
2058
2059 Stage-0
2060   Fetch Operator
2061     limit:-1
2062     Stage-1
2063       Reducer 4 llap
2064       File Output Operator [FS_31]
2065         Merge Join Operator [MERGEJOIN_44] (rows=32 width=186)
2066           Conds:RS_27._col2=RS_28._col0(Left Semi),Output:["_col0","_col1","_col2"]
2067         <-Reducer 3 [SIMPLE_EDGE] llap
2068           SHUFFLE [RS_27]
2069             PartitionCols:_col2
2070             Filter Operator [FIL_37] (rows=66 width=186)
2071               predicate:_col2 is not null
2072               Group By Operator [GBY_14] (rows=66 width=186)
2073                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
2074               <-Reducer 2 [SIMPLE_EDGE] llap
2075                 SHUFFLE [RS_13]
2076                   PartitionCols:_col0, _col1
2077                   Group By Operator [GBY_12] (rows=66 width=186)
2078                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col0, _col1
2079                     Merge Join Operator [MERGEJOIN_43] (rows=133 width=178)
2080                       Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0","_col1"]
2081                     <-Map 5 [SIMPLE_EDGE] llap
2082                       SHUFFLE [RS_9]
2083                         PartitionCols:_col0
2084                         Group By Operator [GBY_7] (rows=83 width=87)
2085                           Output:["_col0"],keys:_col0
2086                           Select Operator [SEL_5] (rows=166 width=87)
2087                             Output:["_col0"]
2088                             Filter Operator [FIL_39] (rows=166 width=87)
2089                               predicate:(key > '8')
2090                               TableScan [TS_3] (rows=500 width=87)
2091                                 default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2092                     <-Map 1 [SIMPLE_EDGE] llap
2093                       SHUFFLE [RS_8]
2094                         PartitionCols:_col0
2095                         Select Operator [SEL_2] (rows=166 width=178)
2096                           Output:["_col0","_col1"]
2097                           Filter Operator [FIL_38] (rows=166 width=178)
2098                             predicate:(key > '8')
2099                             TableScan [TS_0] (rows=500 width=178)
2100                               default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
2101         <-Reducer 6 [SIMPLE_EDGE] llap
2102           SHUFFLE [RS_28]
2103             PartitionCols:_col0
2104             Group By Operator [GBY_26] (rows=41 width=8)
2105               Output:["_col0"],keys:_col0
2106               Select Operator [SEL_24] (rows=83 width=8)
2107                 Output:["_col0"]
2108                 Filter Operator [FIL_40] (rows=83 width=8)
2109                   predicate:_col1 is not null
2110                   Select Operator [SEL_42] (rows=83 width=8)
2111                     Output:["_col1"]
2112                     Group By Operator [GBY_22] (rows=83 width=95)
2113                       Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
2114                     <-Map 5 [SIMPLE_EDGE] llap
2115                       SHUFFLE [RS_21]
2116                         PartitionCols:_col0
2117                         Group By Operator [GBY_20] (rows=83 width=95)
2118                           Output:["_col0","_col1"],aggregations:["count()"],keys:key
2119                           Filter Operator [FIL_41] (rows=166 width=87)
2120                             predicate:(key > '9')
2121                              Please refer to the previous TableScan [TS_3]
2122
2123 PREHOOK: query: explain select p_mfgr, p_name, avg(p_size) 
2124 from part 
2125 group by p_mfgr, p_name
2126 having p_name in 
2127   (select first_value(p_name) over(partition by p_mfgr order by p_size) from part)
2128 PREHOOK: type: QUERY
2129 POSTHOOK: query: explain select p_mfgr, p_name, avg(p_size) 
2130 from part 
2131 group by p_mfgr, p_name
2132 having p_name in 
2133   (select first_value(p_name) over(partition by p_mfgr order by p_size) from part)
2134 POSTHOOK: type: QUERY
2135 Plan optimized by CBO.
2136
2137 Vertex dependency in root stage
2138 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2139 Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
2140 Reducer 5 <- Map 4 (SIMPLE_EDGE)
2141
2142 Stage-0
2143   Fetch Operator
2144     limit:-1
2145     Stage-1
2146       Reducer 3 llap
2147       File Output Operator [FS_21]
2148         Merge Join Operator [MERGEJOIN_26] (rows=6 width=227)
2149           Conds:RS_17._col1=RS_18._col0(Left Semi),Output:["_col0","_col1","_col2"]
2150         <-Reducer 2 [SIMPLE_EDGE] llap
2151           SHUFFLE [RS_17]
2152             PartitionCols:_col1
2153             Select Operator [SEL_6] (rows=13 width=227)
2154               Output:["_col0","_col1","_col2"]
2155               Group By Operator [GBY_5] (rows=13 width=227)
2156                 Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)"],keys:KEY._col0, KEY._col1
2157               <-Map 1 [SIMPLE_EDGE] llap
2158                 SHUFFLE [RS_4]
2159                   PartitionCols:_col0, _col1
2160                   Group By Operator [GBY_3] (rows=13 width=295)
2161                     Output:["_col0","_col1","_col2"],aggregations:["avg(p_size)"],keys:p_name, p_mfgr
2162                     Filter Operator [FIL_24] (rows=26 width=223)
2163                       predicate:p_name is not null
2164                       TableScan [TS_0] (rows=26 width=223)
2165                         default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"]
2166         <-Reducer 5 [SIMPLE_EDGE] llap
2167           SHUFFLE [RS_18]
2168             PartitionCols:_col0
2169             Group By Operator [GBY_16] (rows=13 width=184)
2170               Output:["_col0"],keys:_col0
2171               Select Operator [SEL_11] (rows=26 width=184)
2172                 Output:["_col0"]
2173                 Filter Operator [FIL_25] (rows=26 width=491)
2174                   predicate:first_value_window_0 is not null
2175                   PTF Operator [PTF_10] (rows=26 width=491)
2176                     Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col5 ASC NULLS FIRST","partition by:":"_col2"}]
2177                     Select Operator [SEL_9] (rows=26 width=491)
2178                       Output:["_col1","_col2","_col5"]
2179                     <-Map 4 [SIMPLE_EDGE] llap
2180                       SHUFFLE [RS_8]
2181                         PartitionCols:p_mfgr
2182                         TableScan [TS_7] (rows=26 width=223)
2183                           default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"]
2184
2185 PREHOOK: query: explain select * 
2186 from src_cbo 
2187 where src_cbo.key not in  
2188   ( select key  from src_cbo s1 
2189     where s1.key > '2'
2190   ) order by key
2191 PREHOOK: type: QUERY
2192 POSTHOOK: query: explain select * 
2193 from src_cbo 
2194 where src_cbo.key not in  
2195   ( select key  from src_cbo s1 
2196     where s1.key > '2'
2197   ) order by key
2198 POSTHOOK: type: QUERY
2199 Plan optimized by CBO.
2200
2201 Vertex dependency in root stage
2202 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Reducer 6 (CUSTOM_SIMPLE_EDGE)
2203 Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (ONE_TO_ONE_EDGE)
2204 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
2205 Reducer 6 <- Map 5 (CUSTOM_SIMPLE_EDGE)
2206 Reducer 7 <- Map 5 (SIMPLE_EDGE)
2207
2208 Stage-0
2209   Fetch Operator
2210     limit:-1
2211     Stage-1
2212       Reducer 4 llap
2213       File Output Operator [FS_26]
2214         Select Operator [SEL_25] (rows=500 width=178)
2215           Output:["_col0","_col1"]
2216         <-Reducer 3 [SIMPLE_EDGE] llap
2217           SHUFFLE [RS_24]
2218             Select Operator [SEL_23] (rows=500 width=178)
2219               Output:["_col0","_col1"]
2220               Filter Operator [FIL_22] (rows=500 width=195)
2221                 predicate:((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2)))
2222                 Merge Join Operator [MERGEJOIN_31] (rows=500 width=195)
2223                   Conds:RS_19._col0=RS_20._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5"]
2224                 <-Reducer 2 [SIMPLE_EDGE] llap
2225                   SHUFFLE [RS_19]
2226                     PartitionCols:_col0
2227                     Merge Join Operator [MERGEJOIN_30] (rows=500 width=194)
2228                       Conds:(Inner),Output:["_col0","_col1","_col2","_col3"]
2229                     <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
2230                       PARTITION_ONLY_SHUFFLE [RS_16]
2231                         Select Operator [SEL_1] (rows=500 width=178)
2232                           Output:["_col0","_col1"]
2233                           TableScan [TS_0] (rows=500 width=178)
2234                             default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
2235                     <-Reducer 6 [CUSTOM_SIMPLE_EDGE] llap
2236                       PARTITION_ONLY_SHUFFLE [RS_17]
2237                         Group By Operator [GBY_7] (rows=1 width=16)
2238                           Output:["_col0","_col1"],aggregations:["count(VALUE._col0)","count(VALUE._col1)"]
2239                         <-Map 5 [CUSTOM_SIMPLE_EDGE] llap
2240                           SHUFFLE [RS_6]
2241                             Group By Operator [GBY_5] (rows=1 width=16)
2242                               Output:["_col0","_col1"],aggregations:["count()","count(key)"]
2243                               Filter Operator [FIL_28] (rows=166 width=87)
2244                                 predicate:(key > '2')
2245                                 TableScan [TS_2] (rows=500 width=87)
2246                                   default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2247                 <-Reducer 7 [ONE_TO_ONE_EDGE] llap
2248                   FORWARD [RS_20]
2249                     PartitionCols:_col0
2250                     Select Operator [SEL_15] (rows=83 width=91)
2251                       Output:["_col0","_col1"]
2252                       Group By Operator [GBY_14] (rows=83 width=87)
2253                         Output:["_col0"],keys:KEY._col0
2254                       <-Map 5 [SIMPLE_EDGE] llap
2255                         SHUFFLE [RS_13]
2256                           PartitionCols:_col0
2257                           Group By Operator [GBY_12] (rows=83 width=87)
2258                             Output:["_col0"],keys:key
2259                              Please refer to the previous Filter Operator [FIL_28]
2260
2261 PREHOOK: query: explain select p_mfgr, b.p_name, p_size 
2262 from part b 
2263 where b.p_name not in 
2264   (select p_name 
2265   from (select p_mfgr, p_name, p_size as r from part) a 
2266   where r < 10 and b.p_mfgr = a.p_mfgr 
2267   )
2268 PREHOOK: type: QUERY
2269 POSTHOOK: query: explain select p_mfgr, b.p_name, p_size 
2270 from part b 
2271 where b.p_name not in 
2272   (select p_name 
2273   from (select p_mfgr, p_name, p_size as r from part) a 
2274   where r < 10 and b.p_mfgr = a.p_mfgr 
2275   )
2276 POSTHOOK: type: QUERY
2277 Plan optimized by CBO.
2278
2279 Vertex dependency in root stage
2280 Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (ONE_TO_ONE_EDGE)
2281 Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
2282 Reducer 4 <- Map 1 (SIMPLE_EDGE)
2283 Reducer 5 <- Map 1 (SIMPLE_EDGE)
2284
2285 Stage-0
2286   Fetch Operator
2287     limit:-1
2288     Stage-1
2289       Reducer 3 llap
2290       File Output Operator [FS_26]
2291         Select Operator [SEL_25] (rows=13 width=223)
2292           Output:["_col0","_col1","_col2"]
2293           Filter Operator [FIL_24] (rows=13 width=231)
2294             predicate:(not CASE WHEN ((_col4 = 0L)) THEN (false) WHEN (_col4 is null) THEN (false) WHEN (_col8 is not null) THEN (true) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (true) ELSE (false) END)
2295             Merge Join Operator [MERGEJOIN_32] (rows=26 width=230)
2296               Conds:RS_21._col0, _col1=RS_22._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col8"]
2297             <-Reducer 2 [SIMPLE_EDGE] llap
2298               SHUFFLE [RS_21]
2299                 PartitionCols:_col0, _col1
2300                 Merge Join Operator [MERGEJOIN_31] (rows=26 width=229)
2301                   Conds:RS_18._col1=RS_19._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
2302                 <-Map 1 [SIMPLE_EDGE] llap
2303                   SHUFFLE [RS_18]
2304                     PartitionCols:_col1
2305                     Select Operator [SEL_1] (rows=26 width=223)
2306                       Output:["_col0","_col1","_col2"]
2307                       TableScan [TS_0] (rows=26 width=223)
2308                         default@part,b,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"]
2309                 <-Reducer 4 [ONE_TO_ONE_EDGE] llap
2310                   FORWARD [RS_19]
2311                     PartitionCols:_col0
2312                     Group By Operator [GBY_7] (rows=2 width=114)
2313                       Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0
2314                     <-Map 1 [SIMPLE_EDGE] llap
2315                       SHUFFLE [RS_6]
2316                         PartitionCols:_col0
2317                         Group By Operator [GBY_5] (rows=2 width=114)
2318                           Output:["_col0","_col1","_col2"],aggregations:["count()","count(p_name)"],keys:p_mfgr
2319                           Select Operator [SEL_4] (rows=8 width=223)
2320                             Output:["p_name","p_mfgr"]
2321                             Filter Operator [FIL_29] (rows=8 width=223)
2322                               predicate:((p_size < 10) and p_mfgr is not null)
2323                                Please refer to the previous TableScan [TS_0]
2324             <-Reducer 5 [ONE_TO_ONE_EDGE] llap
2325               FORWARD [RS_22]
2326                 PartitionCols:_col0, _col1
2327                 Select Operator [SEL_17] (rows=4 width=223)
2328                   Output:["_col0","_col1","_col2"]
2329                   Filter Operator [FIL_16] (rows=4 width=219)
2330                     predicate:_col0 is not null
2331                     Group By Operator [GBY_14] (rows=4 width=219)
2332                       Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
2333                     <-Map 1 [SIMPLE_EDGE] llap
2334                       SHUFFLE [RS_13]
2335                         PartitionCols:_col0, _col1
2336                         Group By Operator [GBY_12] (rows=4 width=219)
2337                           Output:["_col0","_col1"],keys:p_name, p_mfgr
2338                           Select Operator [SEL_11] (rows=8 width=223)
2339                             Output:["p_name","p_mfgr"]
2340                             Filter Operator [FIL_30] (rows=8 width=223)
2341                               predicate:((p_size < 10) and p_mfgr is not null)
2342                                Please refer to the previous TableScan [TS_0]
2343
2344 PREHOOK: query: explain select p_name, p_size 
2345 from 
2346 part where part.p_size not in 
2347   (select avg(p_size) 
2348   from (select p_size from part) a 
2349   where p_size < 10
2350   ) order by p_name
2351 PREHOOK: type: QUERY
2352 POSTHOOK: query: explain select p_name, p_size 
2353 from 
2354 part where part.p_size not in 
2355   (select avg(p_size) 
2356   from (select p_size from part) a 
2357   where p_size < 10
2358   ) order by p_name
2359 POSTHOOK: type: QUERY
2360 Plan optimized by CBO.
2361
2362 Vertex dependency in root stage
2363 Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Reducer 6 (CUSTOM_SIMPLE_EDGE)
2364 Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
2365 Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
2366 Reducer 6 <- Map 5 (CUSTOM_SIMPLE_EDGE)
2367
2368 Stage-0
2369   Fetch Operator
2370     limit:-1
2371     Stage-1
2372       Reducer 4 llap
2373       File Output Operator [FS_31]
2374         Select Operator [SEL_30] (rows=26 width=125)
2375           Output:["_col0","_col1"]
2376         <-Reducer 3 [SIMPLE_EDGE] llap
2377           SHUFFLE [RS_29]
2378             Select Operator [SEL_28] (rows=26 width=125)
2379               Output:["_col0","_col1"]
2380               Filter Operator [FIL_27] (rows=26 width=141)
2381                 predicate:((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2)))
2382                 Merge Join Operator [MERGEJOIN_37] (rows=26 width=141)
2383                   Conds:RS_24.UDFToDouble(_col1)=RS_25._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col5"]
2384                 <-Reducer 6 [SIMPLE_EDGE] llap
2385                   SHUFFLE [RS_25]
2386                     PartitionCols:_col0
2387                     Select Operator [SEL_20] (rows=1 width=12)
2388                       Output:["_col0","_col1"]
2389                       Group By Operator [GBY_7] (rows=1 width=8)
2390                         Output:["_col0"],aggregations:["avg(VALUE._col0)"]
2391                       <-Map 5 [CUSTOM_SIMPLE_EDGE] llap
2392                         PARTITION_ONLY_SHUFFLE [RS_6]
2393                           Group By Operator [GBY_5] (rows=1 width=76)
2394                             Output:["_col0"],aggregations:["avg(p_size)"]
2395                             Filter Operator [FIL_33] (rows=8 width=4)
2396                               predicate:(p_size < 10)
2397                               TableScan [TS_2] (rows=26 width=4)
2398                                 default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_size"]
2399                 <-Reducer 2 [SIMPLE_EDGE] llap
2400                   SHUFFLE [RS_24]
2401                     PartitionCols:UDFToDouble(_col1)
2402                     Merge Join Operator [MERGEJOIN_36] (rows=26 width=141)
2403                       Conds:(Inner),Output:["_col0","_col1","_col2","_col3"]
2404                     <-Reducer 6 [CUSTOM_SIMPLE_EDGE] llap
2405                       SHUFFLE [RS_22]
2406                         Group By Operator [GBY_12] (rows=1 width=16)
2407                           Output:["_col0","_col1"],aggregations:["count()","count(_col0)"]
2408                            Please refer to the previous Group By Operator [GBY_7]
2409                     <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
2410                       PARTITION_ONLY_SHUFFLE [RS_21]
2411                         Select Operator [SEL_1] (rows=26 width=125)
2412                           Output:["_col0","_col1"]
2413                           TableScan [TS_0] (rows=26 width=125)
2414                             default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_size"]
2415
2416 PREHOOK: query: explain select b.p_mfgr, min(p_retailprice) 
2417 from part b 
2418 group by b.p_mfgr
2419 having b.p_mfgr not in 
2420   (select p_mfgr 
2421   from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a 
2422   where min(p_retailprice) = l and r - l > 600
2423   )
2424   order by b.p_mfgr
2425 PREHOOK: type: QUERY
2426 POSTHOOK: query: explain select b.p_mfgr, min(p_retailprice) 
2427 from part b 
2428 group by b.p_mfgr
2429 having b.p_mfgr not in 
2430   (select p_mfgr 
2431   from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a 
2432   where min(p_retailprice) = l and r - l > 600
2433   )
2434   order by b.p_mfgr
2435 POSTHOOK: type: QUERY
2436 Plan optimized by CBO.
2437
2438 Vertex dependency in root stage
2439 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2440 Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (ONE_TO_ONE_EDGE)
2441 Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
2442 Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
2443 Reducer 6 <- Map 1 (SIMPLE_EDGE)
2444 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
2445 Reducer 8 <- Map 1 (SIMPLE_EDGE)
2446
2447 Stage-0
2448   Fetch Operator
2449     limit:-1
2450     Stage-1
2451       Reducer 5 llap
2452       File Output Operator [FS_37]
2453         Select Operator [SEL_36] (rows=3 width=106)
2454           Output:["_col0","_col1"]
2455         <-Reducer 4 [SIMPLE_EDGE] llap
2456           SHUFFLE [RS_35]
2457             Select Operator [SEL_34] (rows=3 width=106)
2458               Output:["_col0","_col1"]
2459               Filter Operator [FIL_33] (rows=3 width=119)
2460                 predicate:(not CASE WHEN ((_col3 = 0L)) THEN (false) WHEN (_col3 is null) THEN (false) WHEN (_col7 is not null) THEN (true) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (true) ELSE (false) END)
2461                 Merge Join Operator [MERGEJOIN_44] (rows=5 width=114)
2462                   Conds:RS_30._col0, _col1=RS_31._col0, _col1(Left Outer),Output:["_col0","_col1","_col3","_col4","_col7"]
2463                 <-Reducer 3 [SIMPLE_EDGE] llap
2464                   SHUFFLE [RS_30]
2465                     PartitionCols:_col0, _col1
2466                     Merge Join Operator [MERGEJOIN_43] (rows=5 width=112)
2467                       Conds:RS_27._col1=RS_28._col0(Left Outer),Output:["_col0","_col1","_col3","_col4"]
2468                     <-Reducer 2 [SIMPLE_EDGE] llap
2469                       SHUFFLE [RS_27]
2470                         PartitionCols:_col1
2471                         Group By Operator [GBY_4] (rows=5 width=106)
2472                           Output:["_col0","_col1"],aggregations:["min(VALUE._col0)"],keys:KEY._col0
2473                         <-Map 1 [SIMPLE_EDGE] llap
2474                           SHUFFLE [RS_3]
2475                             PartitionCols:_col0
2476                             Group By Operator [GBY_2] (rows=5 width=106)
2477                               Output:["_col0","_col1"],aggregations:["min(p_retailprice)"],keys:p_mfgr
2478                               Select Operator [SEL_1] (rows=26 width=106)
2479                                 Output:["p_mfgr","p_retailprice"]
2480                                 TableScan [TS_0] (rows=26 width=106)
2481                                   default@part,b,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_retailprice"]
2482                     <-Reducer 7 [ONE_TO_ONE_EDGE] llap
2483                       FORWARD [RS_28]
2484                         PartitionCols:_col0
2485                         Group By Operator [GBY_16] (rows=1 width=24)
2486                           Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0
2487                         <-Reducer 6 [SIMPLE_EDGE] llap
2488                           SHUFFLE [RS_15]
2489                             PartitionCols:_col0
2490                             Group By Operator [GBY_14] (rows=1 width=24)
2491                               Output:["_col0","_col1","_col2"],aggregations:["count()","count(_col0)"],keys:_col1
2492                               Select Operator [SEL_12] (rows=1 width=114)
2493                                 Output:["_col0","_col1"]
2494                                 Filter Operator [FIL_40] (rows=1 width=114)
2495                                   predicate:(((_col2 - _col1) > 600.0D) and _col1 is not null)
2496                                   Group By Operator [GBY_10] (rows=5 width=114)
2497                                     Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)"],keys:KEY._col0
2498                                   <-Map 1 [SIMPLE_EDGE] llap
2499                                     SHUFFLE [RS_9]
2500                                       PartitionCols:_col0
2501                                       Group By Operator [GBY_8] (rows=5 width=114)
2502                                         Output:["_col0","_col1","_col2"],aggregations:["min(p_retailprice)","max(p_retailprice)"],keys:p_mfgr
2503                                          Please refer to the previous Select Operator [SEL_1]
2504                 <-Reducer 8 [SIMPLE_EDGE] llap
2505                   SHUFFLE [RS_31]
2506                     PartitionCols:_col0, _col1
2507                     Select Operator [SEL_26] (rows=1 width=110)
2508                       Output:["_col0","_col1","_col2"]
2509                       Filter Operator [FIL_25] (rows=1 width=110)
2510                         predicate:_col0 is not null
2511                         Select Operator [SEL_24] (rows=1 width=110)
2512                           Output:["_col0","_col1"]
2513                           Filter Operator [FIL_41] (rows=1 width=114)
2514                             predicate:(((_col2 - _col1) > 600.0D) and _col1 is not null)
2515                             Group By Operator [GBY_22] (rows=5 width=114)
2516                               Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)"],keys:KEY._col0
2517                             <-Map 1 [SIMPLE_EDGE] llap
2518                               SHUFFLE [RS_21]
2519                                 PartitionCols:_col0
2520                                 Group By Operator [GBY_20] (rows=5 width=114)
2521                                   Output:["_col0","_col1","_col2"],aggregations:["min(p_retailprice)","max(p_retailprice)"],keys:p_mfgr
2522                                    Please refer to the previous TableScan [TS_0]
2523
2524 PREHOOK: query: explain select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1
2525 PREHOOK: type: QUERY
2526 POSTHOOK: query: explain select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1
2527 POSTHOOK: type: QUERY
2528 Plan optimized by CBO.
2529
2530 Vertex dependency in root stage
2531 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2532
2533 Stage-0
2534   Fetch Operator
2535     limit:-1
2536     Stage-1
2537       Reducer 2 llap
2538       File Output Operator [FS_6]
2539         Select Operator [SEL_4] (rows=20 width=52)
2540           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
2541           PTF Operator [PTF_3] (rows=20 width=459)
2542             Function definitions:[{},{"name:":"windowingtablefunction","order by:":"0 ASC NULLS FIRST","partition by:":"0"}]
2543             Select Operator [SEL_2] (rows=20 width=459)
2544               Output:["_col2","_col3"]
2545             <-Map 1 [SIMPLE_EDGE] llap
2546               SHUFFLE [RS_1]
2547                 PartitionCols:0
2548                 TableScan [TS_0] (rows=20 width=7)
2549                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int"]
2550
2551 PREHOOK: query: explain select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1
2552 PREHOOK: type: QUERY
2553 POSTHOOK: query: explain select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1
2554 POSTHOOK: type: QUERY
2555 Plan optimized by CBO.
2556
2557 Vertex dependency in root stage
2558 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2559
2560 Stage-0
2561   Fetch Operator
2562     limit:-1
2563     Stage-1
2564       Reducer 2 llap
2565       File Output Operator [FS_6]
2566         Select Operator [SEL_4] (rows=20 width=52)
2567           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
2568           PTF Operator [PTF_3] (rows=20 width=459)
2569             Function definitions:[{},{"name:":"windowingtablefunction","order by:":"0 ASC NULLS FIRST","partition by:":"0"}]
2570             Select Operator [SEL_2] (rows=20 width=459)
2571               Output:["_col2","_col3"]
2572             <-Map 1 [SIMPLE_EDGE] llap
2573               SHUFFLE [RS_1]
2574                 PartitionCols:0
2575                 TableScan [TS_0] (rows=20 width=7)
2576                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int"]
2577
2578 PREHOOK: query: explain select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1
2579 PREHOOK: type: QUERY
2580 POSTHOOK: query: explain select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1
2581 POSTHOOK: type: QUERY
2582 Plan optimized by CBO.
2583
2584 Vertex dependency in root stage
2585 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2586
2587 Stage-0
2588   Fetch Operator
2589     limit:-1
2590     Stage-1
2591       Reducer 2 llap
2592       File Output Operator [FS_6]
2593         Select Operator [SEL_4] (rows=20 width=64)
2594           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
2595           PTF Operator [PTF_3] (rows=20 width=621)
2596             Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}]
2597             Select Operator [SEL_2] (rows=20 width=621)
2598               Output:["_col0","_col1","_col2","_col3"]
2599             <-Map 1 [SIMPLE_EDGE] llap
2600               SHUFFLE [RS_1]
2601                 PartitionCols:key
2602                 TableScan [TS_0] (rows=20 width=169)
2603                   default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int","key","value"]
2604
2605 PREHOOK: query: explain select *, rank() over(partition by key order by value) as rr from src1
2606 PREHOOK: type: QUERY
2607 POSTHOOK: query: explain select *, rank() over(partition by key order by value) as rr from src1
2608 POSTHOOK: type: QUERY
2609 Plan optimized by CBO.
2610
2611 Vertex dependency in root stage
2612 Reducer 2 <- Map 1 (SIMPLE_EDGE)
2613
2614 Stage-0
2615   Fetch Operator
2616     limit:-1
2617     Stage-1
2618       Reducer 2 llap
2619       File Output Operator [FS_6]
2620         Select Operator [SEL_4] (rows=25 width=179)
2621           Output:["_col0","_col1","_col2"]
2622           PTF Operator [PTF_3] (rows=25 width=443)
2623             Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}]
2624             Select Operator [SEL_2] (rows=25 width=443)
2625               Output:["_col0","_col1"]
2626             <-Map 1 [SIMPLE_EDGE] llap
2627               SHUFFLE [RS_1]
2628                 PartitionCols:key
2629                 TableScan [TS_0] (rows=25 width=175)
2630                   default@src1,src1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
2631
2632 PREHOOK: query: explain
2633 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2634 FROM (select x.key AS key, count(1) AS cnt
2635       FROM src1 x JOIN src y ON (x.key = y.key)
2636       GROUP BY x.key) tmp
2637 PREHOOK: type: QUERY
2638 POSTHOOK: query: explain
2639 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2640 FROM (select x.key AS key, count(1) AS cnt
2641       FROM src1 x JOIN src y ON (x.key = y.key)
2642       GROUP BY x.key) tmp
2643 POSTHOOK: type: QUERY
2644 Plan optimized by CBO.
2645
2646 Vertex dependency in root stage
2647 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
2648 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
2649 Reducer 4 <- Reducer 3 (CUSTOM_SIMPLE_EDGE)
2650
2651 Stage-0
2652   Fetch Operator
2653     limit:-1
2654     Stage-1
2655       Reducer 4 llap
2656       File Output Operator [FS_19]
2657         Group By Operator [GBY_17] (rows=1 width=16)
2658           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
2659         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
2660           PARTITION_ONLY_SHUFFLE [RS_16]
2661             Group By Operator [GBY_15] (rows=1 width=16)
2662               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
2663               Select Operator [SEL_13] (rows=16 width=94)
2664                 Output:["_col0","_col1"]
2665                 Group By Operator [GBY_12] (rows=16 width=94)
2666                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
2667                 <-Reducer 2 [SIMPLE_EDGE] llap
2668                   SHUFFLE [RS_11]
2669                     PartitionCols:_col0
2670                     Group By Operator [GBY_10] (rows=16 width=94)
2671                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
2672                       Merge Join Operator [MERGEJOIN_24] (rows=40 width=86)
2673                         Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"]
2674                       <-Map 1 [SIMPLE_EDGE] llap
2675                         SHUFFLE [RS_6]
2676                           PartitionCols:_col0
2677                           Select Operator [SEL_2] (rows=25 width=86)
2678                             Output:["_col0"]
2679                             Filter Operator [FIL_22] (rows=25 width=86)
2680                               predicate:key is not null
2681                               TableScan [TS_0] (rows=25 width=86)
2682                                 default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2683                       <-Map 5 [SIMPLE_EDGE] llap
2684                         SHUFFLE [RS_7]
2685                           PartitionCols:_col0
2686                           Select Operator [SEL_5] (rows=500 width=87)
2687                             Output:["_col0"]
2688                             Filter Operator [FIL_23] (rows=500 width=87)
2689                               predicate:key is not null
2690                               TableScan [TS_3] (rows=500 width=87)
2691                                 default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2692
2693 PREHOOK: query: explain
2694 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2695 FROM (select x.key AS key, count(1) AS cnt
2696       FROM src1 x JOIN src y ON (x.key = y.key)
2697       GROUP BY x.key) tmp
2698 PREHOOK: type: QUERY
2699 POSTHOOK: query: explain
2700 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2701 FROM (select x.key AS key, count(1) AS cnt
2702       FROM src1 x JOIN src y ON (x.key = y.key)
2703       GROUP BY x.key) tmp
2704 POSTHOOK: type: QUERY
2705 Plan optimized by CBO.
2706
2707 Vertex dependency in root stage
2708 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
2709 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
2710 Reducer 4 <- Reducer 3 (CUSTOM_SIMPLE_EDGE)
2711
2712 Stage-0
2713   Fetch Operator
2714     limit:-1
2715     Stage-1
2716       Reducer 4 llap
2717       File Output Operator [FS_19]
2718         Group By Operator [GBY_17] (rows=1 width=16)
2719           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
2720         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
2721           PARTITION_ONLY_SHUFFLE [RS_16]
2722             Group By Operator [GBY_15] (rows=1 width=16)
2723               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
2724               Select Operator [SEL_13] (rows=16 width=94)
2725                 Output:["_col0","_col1"]
2726                 Group By Operator [GBY_12] (rows=16 width=94)
2727                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
2728                 <-Reducer 2 [SIMPLE_EDGE] llap
2729                   SHUFFLE [RS_11]
2730                     PartitionCols:_col0
2731                     Group By Operator [GBY_10] (rows=16 width=94)
2732                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
2733                       Merge Join Operator [MERGEJOIN_24] (rows=40 width=86)
2734                         Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"]
2735                       <-Map 1 [SIMPLE_EDGE] llap
2736                         SHUFFLE [RS_6]
2737                           PartitionCols:_col0
2738                           Select Operator [SEL_2] (rows=25 width=86)
2739                             Output:["_col0"]
2740                             Filter Operator [FIL_22] (rows=25 width=86)
2741                               predicate:key is not null
2742                               TableScan [TS_0] (rows=25 width=86)
2743                                 default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2744                       <-Map 5 [SIMPLE_EDGE] llap
2745                         SHUFFLE [RS_7]
2746                           PartitionCols:_col0
2747                           Select Operator [SEL_5] (rows=500 width=87)
2748                             Output:["_col0"]
2749                             Filter Operator [FIL_23] (rows=500 width=87)
2750                               predicate:key is not null
2751                               TableScan [TS_3] (rows=500 width=87)
2752                                 default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2753
2754 PREHOOK: query: explain
2755 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2756 FROM (select x.key AS key, count(1) AS cnt
2757       FROM src1 x JOIN src y ON (x.key = y.key)
2758       GROUP BY x.key) tmp
2759 PREHOOK: type: QUERY
2760 POSTHOOK: query: explain
2761 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2762 FROM (select x.key AS key, count(1) AS cnt
2763       FROM src1 x JOIN src y ON (x.key = y.key)
2764       GROUP BY x.key) tmp
2765 POSTHOOK: type: QUERY
2766 Plan optimized by CBO.
2767
2768 Vertex dependency in root stage
2769 Map 2 <- Map 1 (BROADCAST_EDGE)
2770 Reducer 3 <- Map 2 (SIMPLE_EDGE)
2771 Reducer 4 <- Reducer 3 (CUSTOM_SIMPLE_EDGE)
2772
2773 Stage-0
2774   Fetch Operator
2775     limit:-1
2776     Stage-1
2777       Reducer 4 llap
2778       File Output Operator [FS_19]
2779         Group By Operator [GBY_17] (rows=1 width=16)
2780           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
2781         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
2782           PARTITION_ONLY_SHUFFLE [RS_16]
2783             Group By Operator [GBY_15] (rows=1 width=16)
2784               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
2785               Select Operator [SEL_13] (rows=16 width=94)
2786                 Output:["_col0","_col1"]
2787                 Group By Operator [GBY_12] (rows=16 width=94)
2788                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
2789                 <-Map 2 [SIMPLE_EDGE] llap
2790                   SHUFFLE [RS_11]
2791                     PartitionCols:_col0
2792                     Group By Operator [GBY_10] (rows=16 width=94)
2793                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
2794                       Map Join Operator [MAPJOIN_24] (rows=40 width=86)
2795                         Conds:RS_6._col0=SEL_5._col0(Inner),Output:["_col0"]
2796                       <-Map 1 [BROADCAST_EDGE] llap
2797                         BROADCAST [RS_6]
2798                           PartitionCols:_col0
2799                           Select Operator [SEL_2] (rows=25 width=86)
2800                             Output:["_col0"]
2801                             Filter Operator [FIL_22] (rows=25 width=86)
2802                               predicate:key is not null
2803                               TableScan [TS_0] (rows=25 width=86)
2804                                 default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2805                       <-Select Operator [SEL_5] (rows=500 width=87)
2806                           Output:["_col0"]
2807                           Filter Operator [FIL_23] (rows=500 width=87)
2808                             predicate:key is not null
2809                             TableScan [TS_3] (rows=500 width=87)
2810                               default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2811
2812 PREHOOK: query: explain
2813 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2814 FROM (select x.key AS key, count(1) AS cnt
2815       FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key)
2816       GROUP BY x.key) tmp
2817 PREHOOK: type: QUERY
2818 POSTHOOK: query: explain
2819 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
2820 FROM (select x.key AS key, count(1) AS cnt
2821       FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key)
2822       GROUP BY x.key) tmp
2823 POSTHOOK: type: QUERY
2824 Plan optimized by CBO.
2825
2826 Vertex dependency in root stage
2827 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
2828 Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
2829 Reducer 4 <- Reducer 3 (CUSTOM_SIMPLE_EDGE)
2830
2831 Stage-0
2832   Fetch Operator
2833     limit:-1
2834     Stage-1
2835       Reducer 4 llap
2836       File Output Operator [FS_21]
2837         Group By Operator [GBY_19] (rows=1 width=16)
2838           Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
2839         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
2840           PARTITION_ONLY_SHUFFLE [RS_18]
2841             Group By Operator [GBY_17] (rows=1 width=16)
2842               Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"]
2843               Select Operator [SEL_15] (rows=10 width=94)
2844                 Output:["_col0","_col1"]
2845                 Group By Operator [GBY_14] (rows=10 width=94)
2846                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
2847                 <-Reducer 2 [SIMPLE_EDGE] llap
2848                   SHUFFLE [RS_13]
2849                     PartitionCols:_col0
2850                     Group By Operator [GBY_12] (rows=10 width=94)
2851                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
2852                       Merge Join Operator [MERGEJOIN_26] (rows=20 width=86)
2853                         Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0"]
2854                       <-Map 1 [SIMPLE_EDGE] llap
2855                         SHUFFLE [RS_8]
2856                           PartitionCols:_col0
2857                           Select Operator [SEL_2] (rows=25 width=86)
2858                             Output:["_col0"]
2859                             Filter Operator [FIL_24] (rows=25 width=86)
2860                               predicate:key is not null
2861                               TableScan [TS_0] (rows=25 width=86)
2862                                 default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2863                       <-Map 5 [SIMPLE_EDGE] llap
2864                         SHUFFLE [RS_9]
2865                           PartitionCols:_col0
2866                           Group By Operator [GBY_7] (rows=250 width=87)
2867                             Output:["_col0"],keys:_col0
2868                             Select Operator [SEL_5] (rows=500 width=87)
2869                               Output:["_col0"]
2870                               Filter Operator [FIL_25] (rows=500 width=87)
2871                                 predicate:key is not null
2872                                 TableScan [TS_3] (rows=500 width=87)
2873                                   default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
2874
2875 PREHOOK: query: explain create table abcd (a int, b int, c int, d int)
2876 PREHOOK: type: CREATETABLE
2877 POSTHOOK: query: explain create table abcd (a int, b int, c int, d int)
2878 POSTHOOK: type: CREATETABLE
2879 Stage-0
2880   Create Table Operator:
2881     name:default.abcd
2882
2883 PREHOOK: query: create table abcd (a int, b int, c int, d int)
2884 PREHOOK: type: CREATETABLE
2885 PREHOOK: Output: database:default
2886 PREHOOK: Output: default@abcd
2887 POSTHOOK: query: create table abcd (a int, b int, c int, d int)
2888 POSTHOOK: type: CREATETABLE
2889 POSTHOOK: Output: database:default
2890 POSTHOOK: Output: default@abcd
2891 PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' INTO TABLE abcd
2892 PREHOOK: type: LOAD
2893 #### A masked pattern was here ####
2894 PREHOOK: Output: default@abcd
2895 POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' INTO TABLE abcd
2896 POSTHOOK: type: LOAD
2897 #### A masked pattern was here ####
2898 POSTHOOK: Output: default@abcd
2899 PREHOOK: query: explain select a, count(distinct b), count(distinct c), sum(d) from abcd group by a