Plan not optimized by CBO. Vertex dependency in root stage Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE) Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) Reducer 5 <- Map 4 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:-1 Stage-1 Reducer 3 File Output Operator [FS_24] Merge Join Operator [MERGEJOIN_27] (rows=70171297 width=8838) Conds:RS_20._col0=RS_21._col0(Outer),Output:["_col0","_col1"] <-Reducer 2 [SIMPLE_EDGE] SHUFFLE [RS_20] PartitionCols:_col0 Limit [LIM_12] (rows=1 width=20976) Number of rows:1 Select Operator [SEL_11] (rows=1 width=20976) Output:["_col0"] <-Map 1 [CUSTOM_SIMPLE_EDGE] PARTITION_ONLY_SHUFFLE [RS_10] Limit [LIM_9] (rows=1 width=20976) Number of rows:1 Select Operator [SEL_8] (rows=6898050 width=20976) Output:["_col0"] Lateral View Join Operator [LVJ_6] (rows=6898050 width=20976) Output:["_col3"] Filter Operator [FIL_25] (rows=2299350 width=20976) predicate:(col.id = '5ef0bad74d325f72f0360c19') UDTF Operator [UDTF_5] (rows=4598700 width=20976) function name:explode Select Operator [SEL_4] (rows=4598700 width=20976) Output:["_col0"] Lateral View Forward [LVF_2] (rows=4598700 width=20976) Select Operator [SEL_1] (rows=4598700 width=20976) Output:["_col1"] TableScan [TS_0] (rows=4598700 width=20976) default@id_table,id_table,Tbl:COMPLETE,Col:NONE,Output:["record"] <-Reducer 5 [SIMPLE_EDGE] SHUFFLE [RS_21] PartitionCols:_col0 Group By Operator [GBY_18] (rows=63792087 width=8838) Output:["_col0"],keys:KEY._col0 <-Map 4 [SIMPLE_EDGE] SHUFFLE [RS_17] PartitionCols:_col0 Group By Operator [GBY_16] (rows=127584175 width=8838) Output:["_col0"],keys:reference['id'] Select Operator [SEL_15] (rows=127584175 width=8838) Output:["reference"] Filter Operator [FIL_26] (rows=127584175 width=8838) predicate:((type = '1b0e9eb5c492d1859815410253dd79b5') and ('5ef0bad74d325f72f0360c19' = reference['id'])) TableScan [TS_13] (rows=255168350 width=8838) default@reference_table,reference_table,Tbl:COMPLETE,Col:NONE,Output:["type","reference"]