tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [09/17] tajo git commit: TAJO-1352: Improve the join order algorithm to consider missed cases of associative join operators. (jihoon)
Date Mon, 20 Jul 2015 03:31:15 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/bedce3aa/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
index 2b7db47..9685885 100644
--- a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort.plan
@@ -3,31 +3,31 @@ explain
 SORT(6)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc),default.a.o_custkey (INT4) (asc),default.part.p_name (TEXT) (asc)
    JOIN(12)(INNER)
-     => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+     => Join Cond: default.lineitem.l_orderkey (INT4) = default.a.o_orderkey (INT4)
      => 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: {(5) default.a.o_custkey (INT4), 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)}
+     => 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)
+        => 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)}
+         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_orderkey (INT4) = default.a.o_orderkey (INT4)
-        => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-        => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-        => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+        => 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(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)}
-         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)}
-            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)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -52,41 +52,41 @@ Block Id: eb_0000000000000_0000_000005 [LEAF]
 [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)
 
 [Enforcers]
- 0: type=Broadcast, tables=default.orders
- 1: type=Broadcast, tables=default.part
+ 0: type=Broadcast, tables=default.part
+ 1: type=Broadcast, tables=default.orders
 
 SORT(18)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc),default.a.o_custkey (INT4) (asc),default.part.p_name (TEXT) (asc)
    JOIN(12)(INNER)
-     => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+     => Join Cond: default.lineitem.l_orderkey (INT4) = default.a.o_orderkey (INT4)
      => 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: {(5) default.a.o_custkey (INT4), 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)}
+     => 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)
+        => 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_orderkey (INT4) = default.a.o_orderkey (INT4)
-        => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-        => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-        => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+        => 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(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)}
-         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_000006 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/bedce3aa/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort_NoBroadcast.plan
index 0c134d5..7ab1815 100644
--- a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort_NoBroadcast.plan
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery.Sort_NoBroadcast.plan
@@ -3,31 +3,31 @@ explain
 SORT(6)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc),default.a.o_custkey (INT4) (asc),default.part.p_name (TEXT) (asc)
    JOIN(12)(INNER)
-     => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+     => Join Cond: default.lineitem.l_orderkey (INT4) = default.a.o_orderkey (INT4)
      => 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: {(5) default.a.o_custkey (INT4), 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)}
+     => 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)
+        => 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)}
+         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_orderkey (INT4) = default.a.o_orderkey (INT4)
-        => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-        => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-        => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+        => 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(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)}
-         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)}
-            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)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -57,75 +57,75 @@ Block Id: eb_0000000000000_0000_000001 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.o_orderkey (INT4), num=32)
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (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)}
+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.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
 
-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)}
+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.a.o_orderkey (INT4), num=32)
-[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[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_partkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
 
 JOIN(11)(INNER)
-  => Join Cond: default.lineitem.l_orderkey (INT4) = default.a.o_orderkey (INT4)
-  => target list: default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)
-  => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-  => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+  => 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)}
-   SCAN(14) on eb_0000000000000_0000_000001
-     => 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)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000004 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.a.o_orderkey (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)}
+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_partkey (INT4), num=32)
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+[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)
@@ -133,16 +133,16 @@ Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
 SORT(18)
   => Sort Keys: default.lineitem.l_orderkey (INT4) (asc),default.a.o_custkey (INT4) (asc),default.part.p_name (TEXT) (asc)
    JOIN(12)(INNER)
-     => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+     => Join Cond: default.lineitem.l_orderkey (INT4) = default.a.o_orderkey (INT4)
      => 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: {(5) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.part.p_name (TEXT), default.part.p_partkey (INT4)}
+     => in schema: {(4) default.a.o_custkey (INT4), default.a.o_orderkey (INT4), default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
       SCAN(17) on eb_0000000000000_0000_000004
-        => 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)}
+        => 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)}
       SCAN(16) on eb_0000000000000_0000_000003
-        => out schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
-        => in schema: {(3) default.a.o_custkey (INT4), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4)}
+        => out schema: {(2) default.lineitem.l_orderkey (INT4), default.part.p_name (TEXT)}
+        => 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/bedce3aa/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
index 839afaf..ec3578c 100644
--- a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash.plan
@@ -12,33 +12,6 @@ GROUP_BY(18)()
         => 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)}
-         JOIN(22)(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(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_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-              => in  schema: {(2) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-               JOIN(21)(INNER)
-                 => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
-                 => target list: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-                 => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                 => in schema: {(4) 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_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-                    => out schema: {(3) 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)}
          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)}
@@ -52,7 +25,7 @@ GROUP_BY(18)()
                  => Targets: default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)
                  => out schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
                  => in  schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-                  JOIN(20)(INNER)
+                  JOIN(21)(INNER)
                     => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
                     => 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)}
@@ -65,6 +38,33 @@ GROUP_BY(18)()
                        => 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)}
+         JOIN(22)(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(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_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+              => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+               JOIN(20)(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)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -73,27 +73,27 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000012)
 |-eb_0000000000000_0000_000012
    |-eb_0000000000000_0000_000011
       |-eb_0000000000000_0000_000010
-         |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000008
 -------------------------------------------------------------------------------
 Order of Execution
 -------------------------------------------------------------------------------
-1: eb_0000000000000_0000_000003
+1: eb_0000000000000_0000_000008
 2: eb_0000000000000_0000_000010
 3: eb_0000000000000_0000_000011
 4: eb_0000000000000_0000_000012
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000003 [LEAF]
+Block Id: eb_0000000000000_0000_000008 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 3 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
 
 [Enforcers]
  0: type=Broadcast, tables=default.part
 
-GROUP_BY(27)(l_orderkey)
+GROUP_BY(31)(l_orderkey)
   => exprs: (avg(default.e.l_quantity (FLOAT8)))
   => target list: default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)
   => out schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
@@ -102,38 +102,38 @@ GROUP_BY(27)(l_orderkey)
      => Targets: default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)
      => out schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
      => in  schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-      PROJECTION(3)
-        => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-        => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-        => in  schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
+      PROJECTION(10)
+        => Targets: 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: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
          JOIN(21)(INNER)
-           => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
-           => target list: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-           => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-           => in schema: {(4) 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
+           => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
+           => 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)
               => 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_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-              => out schema: {(3) 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)}
+            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_000010 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 3 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
 
 [Outgoing]
 [q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=, num=1)
 
 [Enforcers]
  0: type=Broadcast, tables=default.part
- 1: type=Broadcast, tables=default.c
- 2: type=Broadcast, tables=default.d
+ 1: type=Broadcast, tables=default.a
+ 2: type=Broadcast, tables=default.c
 
 GROUP_BY(35)()
   => exprs: (sum(default.b.l_quantity (FLOAT8)))
@@ -147,6 +147,22 @@ GROUP_BY(35)()
         => 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)
+           => 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(32) 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(22)(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)
@@ -160,40 +176,24 @@ GROUP_BY(35)()
             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: {(2) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-               PROJECTION(10)
-                 => Targets: 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: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
+              => 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(20)(INNER)
-                    => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
-                    => 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
+                    => 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(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)}
-         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(28) on eb_0000000000000_0000_000003
-                    => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-                    => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+                     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_000011 [ROOT]

http://git-wip-us.apache.org/repos/asf/tajo/blob/bedce3aa/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash_NoBroadcast.plan
index 797e842..14f4bb4 100644
--- a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash_NoBroadcast.plan
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Hash_NoBroadcast.plan
@@ -12,33 +12,6 @@ GROUP_BY(18)()
         => 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)}
-         JOIN(22)(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(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_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-              => in  schema: {(2) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-               JOIN(21)(INNER)
-                 => Join Cond: default.a.l_partkey (INT4) = default.part.p_partkey (INT4)
-                 => target list: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-                 => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-                 => in schema: {(4) 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_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-                    => out schema: {(3) 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)}
          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)}
@@ -52,7 +25,7 @@ GROUP_BY(18)()
                  => Targets: default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)
                  => out schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
                  => in  schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-                  JOIN(20)(INNER)
+                  JOIN(21)(INNER)
                     => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
                     => 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)}
@@ -65,6 +38,33 @@ GROUP_BY(18)()
                        => 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)}
+         JOIN(22)(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(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_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+              => in  schema: {(3) default.b.l_linenumber (INT4), default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
+               JOIN(20)(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)}
 explain
 -------------------------------
 -------------------------------------------------------------------------------
@@ -75,10 +75,10 @@ Execution Block Graph (TERMINAL - eb_0000000000000_0000_000012)
       |-eb_0000000000000_0000_000010
          |-eb_0000000000000_0000_000009
             |-eb_0000000000000_0000_000008
-            |-eb_0000000000000_0000_000007
+               |-eb_0000000000000_0000_000007
                |-eb_0000000000000_0000_000006
-               |-eb_0000000000000_0000_000005
-         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000005
+            |-eb_0000000000000_0000_000004
             |-eb_0000000000000_0000_000003
                |-eb_0000000000000_0000_000002
                |-eb_0000000000000_0000_000001
@@ -88,10 +88,10 @@ Order of Execution
 1: eb_0000000000000_0000_000001
 2: eb_0000000000000_0000_000002
 3: eb_0000000000000_0000_000003
-4: eb_0000000000000_0000_000005
+4: eb_0000000000000_0000_000004
 5: eb_0000000000000_0000_000006
-6: eb_0000000000000_0000_000004
-7: eb_0000000000000_0000_000007
+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
@@ -107,8 +107,8 @@ Block Id: eb_0000000000000_0000_000001 [LEAF]
 [q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.a.l_partkey (INT4), num=32)
 
 SCAN(0) on default.lineitem as a
-  => target list: default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)
-  => out schema: {(3) default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
+  => 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)}
 
 =======================================================
@@ -132,39 +132,47 @@ Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
 [q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
 
 [Outgoing]
-[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
 
-GROUP_BY(27)(l_orderkey)
-  => exprs: (avg(default.e.l_quantity (FLOAT8)))
-  => target list: default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)
-  => out schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-  => in schema:{(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-   TABLE_SUBQUERY(11) as default.e
-     => Targets: default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)
-     => out schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-     => in  schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
-      PROJECTION(3)
-        => Targets: default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)
-        => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-        => in  schema: {(2) 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_orderkey (INT4), default.a.l_quantity (FLOAT8)
-           => out schema: {(2) default.a.l_orderkey (INT4), default.a.l_quantity (FLOAT8)}
-           => in schema: {(4) default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8), default.part.p_partkey (INT4)}
-            SCAN(26) on eb_0000000000000_0000_000002
-              => out schema: {(1) default.part.p_partkey (INT4)}
-              => in schema: {(1) default.part.p_partkey (INT4)}
-            SCAN(25) on eb_0000000000000_0000_000001
-              => out schema: {(3) default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (FLOAT8)}
-              => in schema: {(3) default.a.l_orderkey (INT4), default.a.l_partkey (INT4), default.a.l_quantity (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(20)(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(26) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.part.p_partkey (INT4)}
+           => in schema: {(1) default.part.p_partkey (INT4)}
+         SCAN(25) 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_000005 [LEAF]
+Block Id: eb_0000000000000_0000_000004 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 5 => 7 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
+[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)
@@ -172,11 +180,11 @@ SCAN(7) on default.lineitem as d
   => 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_000006 [LEAF]
+Block Id: eb_0000000000000_0000_000007 [LEAF]
 =======================================================
 
 [Outgoing]
-[q_0000000000000_0000] 6 => 7 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+[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)
@@ -184,106 +192,98 @@ SCAN(8) on default.part
   => 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_000004 [INTERMEDIATE]
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+[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] 4 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 5 => 10 (type=HASH_SHUFFLE, key=default.c.o_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(28) on eb_0000000000000_0000_000003
-           => out schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
-           => in schema: {(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+JOIN(22)(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(28) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.c.o_orderkey (INT4)}
+     => in schema: {(1) default.c.o_orderkey (INT4)}
+   SCAN(27) 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_000007 [INTERMEDIATE]
+Block Id: eb_0000000000000_0000_000008 [INTERMEDIATE]
 =======================================================
 
 [Incoming]
-[q_0000000000000_0000] 5 => 7 (type=HASH_SHUFFLE, key=default.d.l_partkey (INT4), num=32)
-[q_0000000000000_0000] 6 => 7 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+[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] 7 => 9 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.e.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: {(2) default.b.l_orderkey (INT4), default.b.l_quantity (FLOAT8)}
-   PROJECTION(10)
-     => Targets: 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: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
-      JOIN(20)(INNER)
-        => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
-        => target list: default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)
+GROUP_BY(31)(l_orderkey)
+  => exprs: (avg(default.e.l_quantity (FLOAT8)))
+  => target list: default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)
+  => out schema:{(2) default.e.l_orderkey (INT4), ?avg_11 (PROTOBUF)}
+  => in schema:{(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
+   TABLE_SUBQUERY(11) as default.e
+     => Targets: default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)
+     => out schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
+     => in  schema: {(2) default.e.l_orderkey (INT4), default.e.l_quantity (FLOAT8)}
+      PROJECTION(10)
+        => Targets: 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(30) on eb_0000000000000_0000_000006
-           => out schema: {(1) default.part.p_partkey (INT4)}
-           => in schema: {(1) default.part.p_partkey (INT4)}
-         SCAN(29) on eb_0000000000000_0000_000005
-           => out schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
-           => in schema: {(3) default.d.l_orderkey (INT4), default.d.l_partkey (INT4), default.d.l_quantity (FLOAT8)}
-
-=======================================================
-Block Id: eb_0000000000000_0000_000008 [LEAF]
-=======================================================
-
-[Outgoing]
-[q_0000000000000_0000] 8 => 9 (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)}
+        => in  schema: {(2) default.d.l_orderkey (INT4), default.d.l_quantity (FLOAT8)}
+         JOIN(21)(INNER)
+           => Join Cond: default.d.l_partkey (INT4) = default.part.p_partkey (INT4)
+           => 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(30) on eb_0000000000000_0000_000007
+              => out schema: {(1) default.part.p_partkey (INT4)}
+              => in schema: {(1) default.part.p_partkey (INT4)}
+            SCAN(29) 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: {(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] 7 => 9 (type=HASH_SHUFFLE, key=default.b.l_orderkey (INT4), num=32)
-[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.c.o_orderkey (INT4), num=32)
+[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.c.o_orderkey (INT4), num=32)
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
 
-JOIN(22)(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(32) on eb_0000000000000_0000_000008
-     => out schema: {(1) default.c.o_orderkey (INT4)}
-     => in schema: {(1) default.c.o_orderkey (INT4)}
-   SCAN(31) on eb_0000000000000_0000_000007
-     => 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)}
+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(32) 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] 4 => 10 (type=HASH_SHUFFLE, key=default.f.l_orderkey (INT4), num=32)
-[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.c.o_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)
@@ -301,11 +301,11 @@ GROUP_BY(35)()
         => 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)}
          SCAN(34) on eb_0000000000000_0000_000009
-           => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-           => in schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
-         SCAN(33) on eb_0000000000000_0000_000004
            => 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)}
+         SCAN(33) on eb_0000000000000_0000_000005
+           => out schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
+           => in schema: {(2) default.b.l_quantity (FLOAT8), default.c.o_orderkey (INT4)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000011 [ROOT]


Mime
View raw message