tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [09/17] tajo git commit: TAJO-2007: By default, Optimizer should use the table volume in TableStat.
Date Thu, 17 Dec 2015 08:28:24 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Hash.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Hash.plan
index 7935c18..e7a3684 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Hash.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Hash.plan
@@ -36,24 +36,99 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
 |-eb_0000000000000_0000_000007
    |-eb_0000000000000_0000_000006
       |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000003
+            |-eb_0000000000000_0000_000002
+            |-eb_0000000000000_0000_000001
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000005
-2: eb_0000000000000_0000_000006
-3: eb_0000000000000_0000_000007
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000005 [LEAF]
+Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT), num=32)
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (INT4), num=32)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.orders
- 1: type=Broadcast, tables=default.part
+SCAN(0) on default.lineitem
+  => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
+  => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(1) on default.part
+  => target list: default.part.p_name (TEXT), default.part.p_partkey (INT4)
+  => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+  => target list: default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
+  => out schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
+  => in schema: {(4) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+   SCAN(15) on eb_0000000000000_0000_000002
+     => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+     => in schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+   SCAN(14) on eb_0000000000000_0000_000001
+     => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+     => in schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.a.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.a
+  => Targets: default.a.o_custkey (INT4), default.a.o_orderkey (INT4)
+  => out schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+  => in  schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+   PROJECTION(3)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4)
+     => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+     => in  schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+      SCAN(2) on default.orders
+        => target list: default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)
+        => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.a.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT), num=32)
 
 SORT(18)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc, nulls last),default.a.o_custkey (INT4) (asc, nulls last),default.part.p_name (TEXT) (asc, nulls last)
@@ -62,31 +137,12 @@ SORT(18)
      => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
      => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
      => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
-      TABLE_SUBQUERY(4) as default.a
-        => Targets: default.a.o_custkey (INT4), default.a.o_orderkey (INT4)
+      SCAN(17) on eb_0000000000000_0000_000004
         => out schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
-        => in  schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
-         PROJECTION(3)
-           => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4)
-           => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-           => in  schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-            SCAN(2) on default.orders
-              => target list: default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)
-              => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
-      JOIN(11)(INNER)
-        => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
-        => target list: default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
+        => in schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+      SCAN(16) on eb_0000000000000_0000_000003
         => out schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
-        => in schema: {(4) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.part.p_name (TEXT), default.part.p_partkey (INT4)}
-         SCAN(1) on default.part
-           => target list: default.part.p_name (TEXT), default.part.p_partkey (INT4)
-           => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
-           => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-         SCAN(0) on default.lineitem
-           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+        => in schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
index 7935c18..e7a3684 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
@@ -36,24 +36,99 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
 |-eb_0000000000000_0000_000007
    |-eb_0000000000000_0000_000006
       |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000003
+            |-eb_0000000000000_0000_000002
+            |-eb_0000000000000_0000_000001
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000005
-2: eb_0000000000000_0000_000006
-3: eb_0000000000000_0000_000007
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000005 [LEAF]
+Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT), num=32)
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (INT4), num=32)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.orders
- 1: type=Broadcast, tables=default.part
+SCAN(0) on default.lineitem
+  => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
+  => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(1) on default.part
+  => target list: default.part.p_name (TEXT), default.part.p_partkey (INT4)
+  => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+  => target list: default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
+  => out schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
+  => in schema: {(4) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+   SCAN(15) on eb_0000000000000_0000_000002
+     => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+     => in schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+   SCAN(14) on eb_0000000000000_0000_000001
+     => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+     => in schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.a.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.a
+  => Targets: default.a.o_custkey (INT4), default.a.o_orderkey (INT4)
+  => out schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+  => in  schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+   PROJECTION(3)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4)
+     => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+     => in  schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+      SCAN(2) on default.orders
+        => target list: default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)
+        => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.a.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT), num=32)
 
 SORT(18)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc, nulls last),default.a.o_custkey (INT4) (asc, nulls last),default.part.p_name (TEXT) (asc, nulls last)
@@ -62,31 +137,12 @@ SORT(18)
      => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
      => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
      => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
-      TABLE_SUBQUERY(4) as default.a
-        => Targets: default.a.o_custkey (INT4), default.a.o_orderkey (INT4)
+      SCAN(17) on eb_0000000000000_0000_000004
         => out schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
-        => in  schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
-         PROJECTION(3)
-           => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4)
-           => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-           => in  schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-            SCAN(2) on default.orders
-              => target list: default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)
-              => out schema: {(2) default.orders.o_custkey (INT4), default.orders.o_orderkey (INT4)}
-              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
-      JOIN(11)(INNER)
-        => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
-        => target list: default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)
+        => in schema: {(2) default.a.o_custkey (INT4), default.a.o_orderkey (INT4)}
+      SCAN(16) on eb_0000000000000_0000_000003
         => out schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
-        => in schema: {(4) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.part.p_name (TEXT), default.part.p_partkey (INT4)}
-         SCAN(1) on default.part
-           => target list: default.part.p_name (TEXT), default.part.p_partkey (INT4)
-           => out schema: {(2) default.part.p_name (TEXT), default.part.p_partkey (INT4)}
-           => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-         SCAN(0) on default.lineitem
-           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+        => in schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
index 20fe5ee..cbd07fc 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
@@ -73,25 +73,157 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000012)
 |-eb_0000000000000_0000_000012
    |-eb_0000000000000_0000_000011
       |-eb_0000000000000_0000_000010
-         |-eb_0000000000000_0000_000008
+         |-eb_0000000000000_0000_000009
+            |-eb_0000000000000_0000_000008
+               |-eb_0000000000000_0000_000007
+               |-eb_0000000000000_0000_000006
+         |-eb_0000000000000_0000_000005
+            |-eb_0000000000000_0000_000004
+            |-eb_0000000000000_0000_000003
+               |-eb_0000000000000_0000_000002
+               |-eb_0000000000000_0000_000001
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000008
-2: eb_0000000000000_0000_000010
-3: eb_0000000000000_0000_000011
-4: eb_0000000000000_0000_000012
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000006
+6: eb_0000000000000_0000_000007
+7: eb_0000000000000_0000_000005
+8: eb_0000000000000_0000_000008
+9: eb_0000000000000_0000_000009
+10: eb_0000000000000_0000_000010
+11: eb_0000000000000_0000_000011
+12: eb_0000000000000_0000_000012
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000008 [LEAF]
+Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.l_partkey (INT4), num=32)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.part
+SCAN(0) on default.lineitem as a
+  => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
+  => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+  => in schema: {(16) default.a.l_comment (TEXT), default.a.l_commitdate (TEXT), default.a.l_discount (FLOAT8), default.a.l_extendedprice (FLOAT8), default.a.l_linenumber (INT4), default.a.l_linestatus (TEXT), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_receiptdate (TEXT), default.a.l_returnflag (TEXT), default.a.l_shipdate (TEXT), default.a.l_shipinstruct (TEXT), default.a.l_shipmode (TEXT), default.a.l_suppkey (INT4), default.a.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(1) on default.part
+  => target list: default.part.p_partkey (INT4)
+  => out schema: {(1) default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.b
+  => Targets: default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)
+  => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+  => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+   PROJECTION(3)
+     => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_linenumber (INT4)
+     => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+     => in  schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+      JOIN(21)(INNER)
+        => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
+        => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
+        => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+        => in schema: {(5) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
+         SCAN(27) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.part.p_partkey (INT4)}
+           => in schema: {(1) default.part.p_partkey (INT4)}
+         SCAN(26) on eb_0000000000000_0000_000001
+           => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+           => in schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+SCAN(5) on default.orders as c
+  => filter: default.c.o_orderkey (INT4) > 0
+  => target list: default.c.o_orderkey (INT4)
+  => out schema: {(1) default.c.o_orderkey (INT4)}
+  => in schema: {(9) default.c.o_clerk (TEXT), default.c.o_comment (TEXT), default.c.o_custkey (INT4), default.c.o_orderdate (TEXT), default.c.o_orderkey (INT4), default.c.o_orderpriority (TEXT), default.c.o_orderstatus (TEXT), default.c.o_shippriority (INT4), default.c.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
+
+SCAN(7) on default.lineitem as d
+  => target list: default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)
+  => out schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
+  => in schema: {(16) default.d.l_comment (TEXT), default.d.l_commitdate (TEXT), default.d.l_discount (FLOAT8), default.d.l_extendedprice (FLOAT8), default.d.l_linenumber (INT4), default.d.l_linestatus (TEXT), default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.d.l_receiptdate (TEXT), default.d.l_returnflag (TEXT), default.d.l_shipdate (TEXT), default.d.l_shipinstruct (TEXT), default.d.l_shipmode (TEXT), default.d.l_suppkey (INT4), default.d.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(8) on default.part
+  => target list: default.part.p_partkey (INT4)
+  => out schema: {(1) default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 10 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+JOIN(23)(INNER)
+  => Join Cond: default.c.o_orderkey (INT4) = default.b.l_orderkey (INT4)
+  => target list: default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)
+  => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
+  => in schema: {(3) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
+   SCAN(29) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.c.o_orderkey (INT4)}
+     => in schema: {(1) default.c.o_orderkey (INT4)}
+   SCAN(28) on eb_0000000000000_0000_000003
+     => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+     => in schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000008 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
 
 GROUP_BY(32)(l_orderkey)
   => exprs: (avg(default.e.l_quantity (FLOAT8)))
@@ -111,30 +243,51 @@ GROUP_BY(32)(l_orderkey)
            => target list: default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)
            => out schema: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
            => in schema: {(4) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
-            SCAN(8) on default.part
-              => target list: default.part.p_partkey (INT4)
+            SCAN(31) on eb_0000000000000_0000_000007
               => out schema: {(1) default.part.p_partkey (INT4)}
-              => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-            SCAN(7) on default.lineitem as d
-              => target list: default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)
+              => in schema: {(1) default.part.p_partkey (INT4)}
+            SCAN(30) on eb_0000000000000_0000_000006
               => out schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
-              => in schema: {(16) default.d.l_comment (TEXT), default.d.l_commitdate (TEXT), default.d.l_discount (FLOAT8), default.d.l_extendedprice (FLOAT8), default.d.l_linenumber (INT4), default.d.l_linestatus (TEXT), default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.d.l_receiptdate (TEXT), default.d.l_returnflag (TEXT), default.d.l_shipdate (TEXT), default.d.l_shipinstruct (TEXT), default.d.l_shipmode (TEXT), default.d.l_suppkey (INT4), default.d.l_tax (FLOAT8)}
+              => in schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000009 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(14) as default.f
+  => Targets: default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)
+  => out schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+  => in  schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+   PROJECTION(13)
+     => Targets: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
+     => out schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+     => in  schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+      GROUP_BY(12)(l_orderkey)
+        => exprs: (avg(?avg_11 (PROTOBUF)))
+        => target list: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
+        => out schema:{(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+        => in schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+         SCAN(33) on eb_0000000000000_0000_000008
+           => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+           => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000010 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 5 => 10 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
 
 [Outgoing]
 [q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=, num=1)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.a
- 1: type=Broadcast, tables=default.c
- 2: type=Broadcast, tables=default.part
-
 GROUP_BY(36)()
   => exprs: (sum(default.b.l_quantity (FLOAT8)))
   => target list: ?sum_12 (FLOAT8)
@@ -147,53 +300,12 @@ GROUP_BY(36)()
         => target list: default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)
         => out schema: {(2) default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)}
         => in schema: {(4) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4), default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-         TABLE_SUBQUERY(14) as default.f
-           => Targets: default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)
+         SCAN(35) on eb_0000000000000_0000_000009
            => out schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-           => in  schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-            PROJECTION(13)
-              => Targets: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
-              => out schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-              => in  schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-               GROUP_BY(12)(l_orderkey)
-                 => exprs: (avg(?avg_11 (PROTOBUF)))
-                 => target list: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
-                 => out schema:{(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-                 => in schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-                  SCAN(33) on eb_0000000000000_0000_000008
-                    => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-                    => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-         JOIN(23)(INNER)
-           => Join Cond: default.c.o_orderkey (INT4) = default.b.l_orderkey (INT4)
-           => target list: default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)
+           => in schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+         SCAN(34) on eb_0000000000000_0000_000005
            => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-           => in schema: {(3) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-            SCAN(5) on default.orders as c
-              => filter: default.c.o_orderkey (INT4) > 0
-              => target list: default.c.o_orderkey (INT4)
-              => out schema: {(1) default.c.o_orderkey (INT4)}
-              => in schema: {(9) default.c.o_clerk (TEXT), default.c.o_comment (TEXT), default.c.o_custkey (INT4), default.c.o_orderdate (TEXT), default.c.o_orderkey (INT4), default.c.o_orderpriority (TEXT), default.c.o_orderstatus (TEXT), default.c.o_shippriority (INT4), default.c.o_totalprice (FLOAT8)}
-            TABLE_SUBQUERY(4) as default.b
-              => Targets: default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)
-              => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
-              => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-               PROJECTION(3)
-                 => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_linenumber (INT4)
-                 => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                 => in  schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                  JOIN(21)(INNER)
-                    => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
-                    => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-                    => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                    => in schema: {(5) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
-                     SCAN(1) on default.part
-                       => target list: default.part.p_partkey (INT4)
-                       => out schema: {(1) default.part.p_partkey (INT4)}
-                       => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-                     SCAN(0) on default.lineitem as a
-                       => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-                       => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
-                       => in schema: {(16) default.a.l_comment (TEXT), default.a.l_commitdate (TEXT), default.a.l_discount (FLOAT8), default.a.l_extendedprice (FLOAT8), default.a.l_linenumber (INT4), default.a.l_linestatus (TEXT), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_receiptdate (TEXT), default.a.l_returnflag (TEXT), default.a.l_shipdate (TEXT), default.a.l_shipinstruct (TEXT), default.a.l_shipmode (TEXT), default.a.l_suppkey (INT4), default.a.l_tax (FLOAT8)}
+           => in schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000011 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort.plan
index 20fe5ee..cbd07fc 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort.plan
@@ -73,25 +73,157 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000012)
 |-eb_0000000000000_0000_000012
    |-eb_0000000000000_0000_000011
       |-eb_0000000000000_0000_000010
-         |-eb_0000000000000_0000_000008
+         |-eb_0000000000000_0000_000009
+            |-eb_0000000000000_0000_000008
+               |-eb_0000000000000_0000_000007
+               |-eb_0000000000000_0000_000006
+         |-eb_0000000000000_0000_000005
+            |-eb_0000000000000_0000_000004
+            |-eb_0000000000000_0000_000003
+               |-eb_0000000000000_0000_000002
+               |-eb_0000000000000_0000_000001
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000008
-2: eb_0000000000000_0000_000010
-3: eb_0000000000000_0000_000011
-4: eb_0000000000000_0000_000012
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000006
+6: eb_0000000000000_0000_000007
+7: eb_0000000000000_0000_000005
+8: eb_0000000000000_0000_000008
+9: eb_0000000000000_0000_000009
+10: eb_0000000000000_0000_000010
+11: eb_0000000000000_0000_000011
+12: eb_0000000000000_0000_000012
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000008 [LEAF]
+Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.l_partkey (INT4), num=32)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.part
+SCAN(0) on default.lineitem as a
+  => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
+  => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+  => in schema: {(16) default.a.l_comment (TEXT), default.a.l_commitdate (TEXT), default.a.l_discount (FLOAT8), default.a.l_extendedprice (FLOAT8), default.a.l_linenumber (INT4), default.a.l_linestatus (TEXT), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_receiptdate (TEXT), default.a.l_returnflag (TEXT), default.a.l_shipdate (TEXT), default.a.l_shipinstruct (TEXT), default.a.l_shipmode (TEXT), default.a.l_suppkey (INT4), default.a.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(1) on default.part
+  => target list: default.part.p_partkey (INT4)
+  => out schema: {(1) default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.b
+  => Targets: default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)
+  => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+  => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+   PROJECTION(3)
+     => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_linenumber (INT4)
+     => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+     => in  schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+      JOIN(21)(INNER)
+        => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
+        => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
+        => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+        => in schema: {(5) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
+         SCAN(27) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.part.p_partkey (INT4)}
+           => in schema: {(1) default.part.p_partkey (INT4)}
+         SCAN(26) on eb_0000000000000_0000_000001
+           => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+           => in schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+SCAN(5) on default.orders as c
+  => filter: default.c.o_orderkey (INT4) > 0
+  => target list: default.c.o_orderkey (INT4)
+  => out schema: {(1) default.c.o_orderkey (INT4)}
+  => in schema: {(9) default.c.o_clerk (TEXT), default.c.o_comment (TEXT), default.c.o_custkey (INT4), default.c.o_orderdate (TEXT), default.c.o_orderkey (INT4), default.c.o_orderpriority (TEXT), default.c.o_orderstatus (TEXT), default.c.o_shippriority (INT4), default.c.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
+
+SCAN(7) on default.lineitem as d
+  => target list: default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)
+  => out schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
+  => in schema: {(16) default.d.l_comment (TEXT), default.d.l_commitdate (TEXT), default.d.l_discount (FLOAT8), default.d.l_extendedprice (FLOAT8), default.d.l_linenumber (INT4), default.d.l_linestatus (TEXT), default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.d.l_receiptdate (TEXT), default.d.l_returnflag (TEXT), default.d.l_shipdate (TEXT), default.d.l_shipinstruct (TEXT), default.d.l_shipmode (TEXT), default.d.l_suppkey (INT4), default.d.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(8) on default.part
+  => target list: default.part.p_partkey (INT4)
+  => out schema: {(1) default.part.p_partkey (INT4)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 10 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+
+JOIN(23)(INNER)
+  => Join Cond: default.c.o_orderkey (INT4) = default.b.l_orderkey (INT4)
+  => target list: default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)
+  => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
+  => in schema: {(3) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
+   SCAN(29) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.c.o_orderkey (INT4)}
+     => in schema: {(1) default.c.o_orderkey (INT4)}
+   SCAN(28) on eb_0000000000000_0000_000003
+     => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+     => in schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000008 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
 
 GROUP_BY(32)(l_orderkey)
   => exprs: (avg(default.e.l_quantity (FLOAT8)))
@@ -111,30 +243,51 @@ GROUP_BY(32)(l_orderkey)
            => target list: default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)
            => out schema: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
            => in schema: {(4) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
-            SCAN(8) on default.part
-              => target list: default.part.p_partkey (INT4)
+            SCAN(31) on eb_0000000000000_0000_000007
               => out schema: {(1) default.part.p_partkey (INT4)}
-              => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-            SCAN(7) on default.lineitem as d
-              => target list: default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)
+              => in schema: {(1) default.part.p_partkey (INT4)}
+            SCAN(30) on eb_0000000000000_0000_000006
               => out schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
-              => in schema: {(16) default.d.l_comment (TEXT), default.d.l_commitdate (TEXT), default.d.l_discount (FLOAT8), default.d.l_extendedprice (FLOAT8), default.d.l_linenumber (INT4), default.d.l_linestatus (TEXT), default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8), default.d.l_receiptdate (TEXT), default.d.l_returnflag (TEXT), default.d.l_shipdate (TEXT), default.d.l_shipinstruct (TEXT), default.d.l_shipmode (TEXT), default.d.l_suppkey (INT4), default.d.l_tax (FLOAT8)}
+              => in schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000009 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(14) as default.f
+  => Targets: default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)
+  => out schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+  => in  schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+   PROJECTION(13)
+     => Targets: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
+     => out schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+     => in  schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+      GROUP_BY(12)(l_orderkey)
+        => exprs: (avg(?avg_11 (PROTOBUF)))
+        => target list: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
+        => out schema:{(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
+        => in schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+         SCAN(33) on eb_0000000000000_0000_000008
+           => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+           => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000010 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 5 => 10 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
 
 [Outgoing]
 [q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=, num=1)
 
-[Enforcers]
- 0: type=Broadcast, tables=default.a
- 1: type=Broadcast, tables=default.c
- 2: type=Broadcast, tables=default.part
-
 GROUP_BY(36)()
   => exprs: (sum(default.b.l_quantity (FLOAT8)))
   => target list: ?sum_12 (FLOAT8)
@@ -147,53 +300,12 @@ GROUP_BY(36)()
         => target list: default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)
         => out schema: {(2) default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)}
         => in schema: {(4) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4), default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-         TABLE_SUBQUERY(14) as default.f
-           => Targets: default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)
+         SCAN(35) on eb_0000000000000_0000_000009
            => out schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-           => in  schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
-            PROJECTION(13)
-              => Targets: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
-              => out schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-              => in  schema: {(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-               GROUP_BY(12)(l_orderkey)
-                 => exprs: (avg(?avg_11 (PROTOBUF)))
-                 => target list: default.e.l_orderkey (INT4), avg_quantity (FLOAT8)
-                 => out schema:{(2) avg_quantity (FLOAT8), default.e.l_orderkey (INT4)}
-                 => in schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-                  SCAN(33) on eb_0000000000000_0000_000008
-                    => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-                    => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-         JOIN(23)(INNER)
-           => Join Cond: default.c.o_orderkey (INT4) = default.b.l_orderkey (INT4)
-           => target list: default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)
+           => in schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+         SCAN(34) on eb_0000000000000_0000_000005
            => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-           => in schema: {(3) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-            SCAN(5) on default.orders as c
-              => filter: default.c.o_orderkey (INT4) > 0
-              => target list: default.c.o_orderkey (INT4)
-              => out schema: {(1) default.c.o_orderkey (INT4)}
-              => in schema: {(9) default.c.o_clerk (TEXT), default.c.o_comment (TEXT), default.c.o_custkey (INT4), default.c.o_orderdate (TEXT), default.c.o_orderkey (INT4), default.c.o_orderpriority (TEXT), default.c.o_orderstatus (TEXT), default.c.o_shippriority (INT4), default.c.o_totalprice (FLOAT8)}
-            TABLE_SUBQUERY(4) as default.b
-              => Targets: default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)
-              => out schema: {(2) default.b.l_quantity (FLOAT8), default.b.l_orderkey (INT4)}
-              => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-               PROJECTION(3)
-                 => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_linenumber (INT4)
-                 => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                 => in  schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                  JOIN(21)(INNER)
-                    => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
-                    => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-                    => out schema: {(3) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                    => in schema: {(5) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
-                     SCAN(1) on default.part
-                       => target list: default.part.p_partkey (INT4)
-                       => out schema: {(1) default.part.p_partkey (INT4)}
-                       => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
-                     SCAN(0) on default.lineitem as a
-                       => target list: default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-                       => out schema: {(4) default.a.l_linenumber (INT4), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
-                       => in schema: {(16) default.a.l_comment (TEXT), default.a.l_commitdate (TEXT), default.a.l_discount (FLOAT8), default.a.l_extendedprice (FLOAT8), default.a.l_linenumber (INT4), default.a.l_linestatus (TEXT), default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.a.l_receiptdate (TEXT), default.a.l_returnflag (TEXT), default.a.l_shipdate (TEXT), default.a.l_shipinstruct (TEXT), default.a.l_shipmode (TEXT), default.a.l_suppkey (INT4), default.a.l_tax (FLOAT8)}
+           => in schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000011 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
index f19b5cd..7848e95 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
@@ -5,10 +5,6 @@ JOIN(11)(INNER)
   => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
-   SCAN(5) on default.supplier as s
-     => target list: default.s.s_nationkey (INT4)
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
    TABLE_SUBQUERY(4) as default.t
      => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
      => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
@@ -27,6 +23,10 @@ JOIN(11)(INNER)
            => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
            => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
            => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -46,18 +46,14 @@ Block Id: eb_0000000000000_0000_000005 [ROOT]
 =======================================================
 
 [Enforcers]
- 0: type=Broadcast, tables=default.r
- 1: type=Broadcast, tables=default.s
+ 0: type=Broadcast, tables=default.n
+ 1: type=Broadcast, tables=default.r
 
 JOIN(11)(INNER)
   => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
   => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
-   SCAN(5) on default.supplier as s
-     => target list: default.s.s_nationkey (INT4)
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
    TABLE_SUBQUERY(4) as default.t
      => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
      => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
@@ -80,6 +76,10 @@ JOIN(11)(INNER)
               => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
               => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
               => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [TERMINAL]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
index 59f15f1..2f7da99 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
@@ -5,10 +5,6 @@ JOIN(11)(INNER)
   => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
-   SCAN(5) on default.supplier as s
-     => target list: default.s.s_nationkey (INT4)
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
    TABLE_SUBQUERY(4) as default.t
      => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
      => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
@@ -27,6 +23,10 @@ JOIN(11)(INNER)
            => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
            => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
            => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -35,26 +35,26 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
 |-eb_0000000000000_0000_000006
    |-eb_0000000000000_0000_000005
       |-eb_0000000000000_0000_000004
-      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000003
          |-eb_0000000000000_0000_000002
-         |-eb_0000000000000_0000_000001
+      |-eb_0000000000000_0000_000001
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000001
-2: eb_0000000000000_0000_000002
-3: eb_0000000000000_0000_000003
-4: eb_0000000000000_0000_000004
+1: eb_0000000000000_0000_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000001
 5: eb_0000000000000_0000_000005
 6: eb_0000000000000_0000_000006
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000001 [LEAF]
+Block Id: eb_0000000000000_0000_000002 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
 
 SCAN(0) on default.nation as n
   => filter: default.n.n_name (TEXT) = MOROCCO
@@ -63,11 +63,11 @@ SCAN(0) on default.nation as n
   => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
 
 =======================================================
-Block Id: eb_0000000000000_0000_000002 [LEAF]
+Block Id: eb_0000000000000_0000_000003 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
 
 SCAN(1) on default.region as r
   => target list: default.r.r_regionkey (INT4)
@@ -75,15 +75,15 @@ SCAN(1) on default.region as r
   => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
 
 =======================================================
-Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
-[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
 
 [Outgoing]
-[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
 
 TABLE_SUBQUERY(4) as default.t
   => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
@@ -98,19 +98,19 @@ TABLE_SUBQUERY(4) as default.t
         => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
         => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
         => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
-         SCAN(14) on eb_0000000000000_0000_000002
+         SCAN(14) on eb_0000000000000_0000_000003
            => out schema: {(1) default.r.r_regionkey (INT4)}
            => in schema: {(1) default.r.r_regionkey (INT4)}
-         SCAN(13) on eb_0000000000000_0000_000001
+         SCAN(13) on eb_0000000000000_0000_000002
            => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
            => in schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
 
 =======================================================
-Block Id: eb_0000000000000_0000_000004 [LEAF]
+Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
 
 SCAN(5) on default.supplier as s
   => target list: default.s.s_nationkey (INT4)
@@ -122,8 +122,8 @@ Block Id: eb_0000000000000_0000_000005 [ROOT]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
 
 JOIN(11)(INNER)
   => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
@@ -131,11 +131,11 @@ JOIN(11)(INNER)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
    SCAN(16) on eb_0000000000000_0000_000004
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(1) default.s.s_nationkey (INT4)}
-   SCAN(15) on eb_0000000000000_0000_000003
      => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
      => in schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+   SCAN(15) on eb_0000000000000_0000_000001
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(1) default.s.s_nationkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [TERMINAL]

http://git-wip-us.apache.org/repos/asf/tajo/blob/c577102e/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
index f19b5cd..7848e95 100644
--- a/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
@@ -5,10 +5,6 @@ JOIN(11)(INNER)
   => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
-   SCAN(5) on default.supplier as s
-     => target list: default.s.s_nationkey (INT4)
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
    TABLE_SUBQUERY(4) as default.t
      => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
      => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
@@ -27,6 +23,10 @@ JOIN(11)(INNER)
            => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
            => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
            => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -46,18 +46,14 @@ Block Id: eb_0000000000000_0000_000005 [ROOT]
 =======================================================
 
 [Enforcers]
- 0: type=Broadcast, tables=default.r
- 1: type=Broadcast, tables=default.s
+ 0: type=Broadcast, tables=default.n
+ 1: type=Broadcast, tables=default.r
 
 JOIN(11)(INNER)
   => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
   => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
   => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
   => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
-   SCAN(5) on default.supplier as s
-     => target list: default.s.s_nationkey (INT4)
-     => out schema: {(1) default.s.s_nationkey (INT4)}
-     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
    TABLE_SUBQUERY(4) as default.t
      => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
      => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
@@ -80,6 +76,10 @@ JOIN(11)(INNER)
               => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
               => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
               => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [TERMINAL]


Mime
View raw message