tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [25/47] tajo git commit: TAJO-1577: Add test cases to verify join plans. (jihoon)
Date Tue, 19 May 2015 02:07:50 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..0ff2719
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.Sort_NoBroadcast.plan
@@ -0,0 +1,328 @@
+explain
+-------------------------------
+GROUP_BY(18)()
+  => exprs: (sum(default.b.l_quantity (FLOAT8)))
+  => target list: ?sum (FLOAT8)
+  => out schema:{(1) ?sum (FLOAT8)}
+  => in schema:{(2) default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)}
+   SELECTION(16)
+     => Search Cond: default.b.l_quantity (FLOAT8) > default.f.avg_quantity (FLOAT8)
+      JOIN(23)(INNER)
+        => Join Cond: default.c.o_orderkey (INT4) = default.f.l_orderkey (INT4)
+        => 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)}
+           => in  schema: {(2) default.f.avg_quantity (FLOAT8), default.f.l_orderkey (INT4)}
+            GROUP_BY(12)(l_orderkey)
+              => exprs: (avg(default.e.l_quantity (FLOAT8)))
+              => 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), 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)}
+                  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
+                       => 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)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000012)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000012
+   |-eb_0000000000000_0000_000011
+      |-eb_0000000000000_0000_000010
+         |-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_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000005
+5: eb_0000000000000_0000_000006
+6: eb_0000000000000_0000_000004
+7: eb_0000000000000_0000_000007
+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_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[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)}
+  => 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 => 4 (type=HASH_SHUFFLE, key=default.e.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)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.e.l_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 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(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)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 7 (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_000006 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 6 => 7 (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_000007 [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)
+
+[Outgoing]
+[q_0000000000000_0000] 7 => 9 (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: {(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)
+        => 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)}
+
+=======================================================
+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)
+
+[Outgoing]
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.c.o_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)}
+
+=======================================================
+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)
+
+[Outgoing]
+[q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(35)()
+  => exprs: (sum(default.b.l_quantity (FLOAT8)))
+  => target list: ?sum_12 (FLOAT8)
+  => out schema:{(1) ?sum_12 (FLOAT8)}
+  => in schema:{(2) default.b.l_quantity (FLOAT8), default.f.avg_quantity (FLOAT8)}
+   SELECTION(16)
+     => Search Cond: default.b.l_quantity (FLOAT8) > default.f.avg_quantity (FLOAT8)
+      JOIN(23)(INNER)
+        => Join Cond: default.c.o_orderkey (INT4) = default.f.l_orderkey (INT4)
+        => 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)}
+         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)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000011 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(18)()
+  => exprs: (sum(?sum_12 (FLOAT8)))
+  => target list: ?sum (FLOAT8)
+  => out schema:{(1) ?sum (FLOAT8)}
+  => in schema:{(1) ?sum_12 (FLOAT8)}
+   SCAN(36) on eb_0000000000000_0000_000010
+     => out schema: {(1) ?sum_12 (FLOAT8)}
+     => in schema: {(1) ?sum_12 (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000012 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.result b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.result
new file mode 100644
index 0000000..dafa89a
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testBroadcastSubquery2.result
@@ -0,0 +1,3 @@
+?sum
+-------------------------------
+85.0

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash.plan
new file mode 100644
index 0000000..2325ed7
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash.plan
@@ -0,0 +1,117 @@
+explain
+-------------------------------
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(3) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+           => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-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_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(3) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   PROJECTION(2)
+     => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in  schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+        => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) name2 (TEXT)}
+        => in schema: {(1) name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..2325ed7
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Hash_NoBroadcast.plan
@@ -0,0 +1,117 @@
+explain
+-------------------------------
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(3) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+           => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-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_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(3) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   PROJECTION(2)
+     => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in  schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+        => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) name2 (TEXT)}
+        => in schema: {(1) name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort.plan
new file mode 100644
index 0000000..2325ed7
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort.plan
@@ -0,0 +1,117 @@
+explain
+-------------------------------
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(3) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+           => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-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_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(3) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   PROJECTION(2)
+     => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in  schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+        => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) name2 (TEXT)}
+        => in schema: {(1) name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..2325ed7
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.Sort_NoBroadcast.plan
@@ -0,0 +1,117 @@
+explain
+-------------------------------
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(3) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+           => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-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_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(3) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   PROJECTION(2)
+     => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in  schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+        => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(8)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) name2 (TEXT)}
+        => in schema: {(1) name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(5)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.result b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.result
new file mode 100644
index 0000000..9244a0b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition5.result
@@ -0,0 +1,29 @@
+n_nationkey,name1,name2
+-------------------------------
+0,ALGE,ALGE
+1,ARGE,ARGE
+2,BRAZ,BRAZ
+3,CANA,CANA
+4,EGYP,EGYP
+5,ETHI,ETHI
+6,FRAN,FRAN
+7,GERM,GERM
+8,INDI,INDI
+9,INDO,INDO
+10,IRAN,IRAN
+11,IRAQ,IRAQ
+12,JAPA,JAPA
+13,JORD,JORD
+14,KENY,KENY
+15,MORO,MORO
+16,MOZA,MOZA
+17,PERU,PERU
+18,CHIN,CHIN
+19,ROMA,ROMA
+20,SAUD,SAUD
+21,VIET,VIET
+22,RUSS,RUSS
+23,UNIT,UNIT
+23,UNIT,UNIT
+24,UNIT,UNIT
+24,UNIT,UNIT

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash.plan
new file mode 100644
index 0000000..15a4a6b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(6) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         UNION(5)
+            PROJECTION(4)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(3) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+            PROJECTION(2)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(1) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000003
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(1) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(3) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.n2.name2 (TEXT)}
+        => in schema: {(1) default.n2.name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..15a4a6b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Hash_NoBroadcast.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(6) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         UNION(5)
+            PROJECTION(4)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(3) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+            PROJECTION(2)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(1) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000003
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(1) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(3) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.n2.name2 (TEXT)}
+        => in schema: {(1) default.n2.name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort.plan
new file mode 100644
index 0000000..15a4a6b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+      TABLE_SUBQUERY(6) as default.n2
+        => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+        => out schema: {(1) name2 (TEXT)}
+        => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+         UNION(5)
+            PROJECTION(4)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(3) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+            PROJECTION(2)
+              => Targets: default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)
+              => out schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+              => in  schema: {(4) default.nation.n_nationkey (INT4), default.nation.n_name (TEXT), default.nation.n_regionkey (INT4), default.nation.n_comment (TEXT)}
+               SCAN(1) on default.nation
+                 => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+                 => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+                 => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000003
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(1) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: substr(default.n2.n_name (TEXT),1,4) as name2
+  => out schema: {(1) name2 (TEXT)}
+  => in  schema: {(4) default.n2.n_comment (TEXT), default.n2.n_name (TEXT), default.n2.n_nationkey (INT4), default.n2.n_regionkey (INT4)}
+   SCAN(3) on default.nation
+     => target list: default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+     => out schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as name1
+  => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+  => in schema: {(4) default.n1.n_comment (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n1.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=name2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=name1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: name1 (TEXT) = name2 (TEXT)
+     => target list: default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+        => in schema: {(2) default.n1.n_nationkey (INT4), name1 (TEXT)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.n2.name2 (TEXT)}
+        => in schema: {(1) default.n2.name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+     => in schema: {(3) default.n1.n_nationkey (INT4), name1 (TEXT), name2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================


Mime
View raw message