tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [24/47] tajo git commit: TAJO-1577: Add test cases to verify join plans. (jihoon)
Date Tue, 19 May 2015 02:07:49 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..15a4a6b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.Sort_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.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.result b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.result
new file mode 100644
index 0000000..2409634
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition6.result
@@ -0,0 +1,56 @@
+n_nationkey,name1,name2
+-------------------------------
+0,ALGE,ALGE
+0,ALGE,ALGE
+1,ARGE,ARGE
+1,ARGE,ARGE
+2,BRAZ,BRAZ
+2,BRAZ,BRAZ
+3,CANA,CANA
+3,CANA,CANA
+4,EGYP,EGYP
+4,EGYP,EGYP
+5,ETHI,ETHI
+5,ETHI,ETHI
+6,FRAN,FRAN
+6,FRAN,FRAN
+7,GERM,GERM
+7,GERM,GERM
+8,INDI,INDI
+8,INDI,INDI
+9,INDO,INDO
+9,INDO,INDO
+10,IRAN,IRAN
+10,IRAN,IRAN
+11,IRAQ,IRAQ
+11,IRAQ,IRAQ
+12,JAPA,JAPA
+12,JAPA,JAPA
+13,JORD,JORD
+13,JORD,JORD
+14,KENY,KENY
+14,KENY,KENY
+15,MORO,MORO
+15,MORO,MORO
+16,MOZA,MOZA
+16,MOZA,MOZA
+17,PERU,PERU
+17,PERU,PERU
+18,CHIN,CHIN
+18,CHIN,CHIN
+19,ROMA,ROMA
+19,ROMA,ROMA
+20,SAUD,SAUD
+20,SAUD,SAUD
+21,VIET,VIET
+21,VIET,VIET
+22,RUSS,RUSS
+22,RUSS,RUSS
+23,UNIT,UNIT
+23,UNIT,UNIT
+23,UNIT,UNIT
+23,UNIT,UNIT
+24,UNIT,UNIT
+24,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/testComplexJoinCondition7.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash.plan
new file mode 100644
index 0000000..cd716a4
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => 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: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+        => out schema: {(2) ?substr_2 (TEXT), default.n2.n_name (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+  => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+  => 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=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=?substr_1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => in schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+        => in schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (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/testComplexJoinCondition7.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..cd716a4
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Hash_NoBroadcast.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => 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: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+        => out schema: {(2) ?substr_2 (TEXT), default.n2.n_name (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+  => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+  => 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=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=?substr_1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => in schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+        => in schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (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/testComplexJoinCondition7.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort.plan
new file mode 100644
index 0000000..cd716a4
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => 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: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+        => out schema: {(2) ?substr_2 (TEXT), default.n2.n_name (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+  => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+  => 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=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=?substr_1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => in schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+        => in schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (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/testComplexJoinCondition7.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..cd716a4
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.Sort_NoBroadcast.plan
@@ -0,0 +1,145 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(0) on default.nation as n1
+        => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => 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: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+        => out schema: {(2) ?substr_2 (TEXT), default.n2.n_name (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(13) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_2 (TEXT), num=32)
+
+TABLE_SUBQUERY(14) as default.n2
+  => Targets: default.n2.n_name (TEXT), substr(default.n2.n_name (TEXT),1,4) as ?substr_2
+  => out schema: {(2) default.n2.n_name (TEXT), ?substr_2 (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=?substr_1 (TEXT), num=32)
+
+SCAN(0) on default.nation as n1
+  => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), substr(default.n1.n_name (TEXT),1,4) as ?substr_1
+  => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+  => 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=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=?substr_2 (TEXT), num=32), union delegated scan: eb_0000000000000_0000_000001
+[q_0000000000000_0000] 4 => 3 (type=HASH_SHUFFLE, key=?substr_1 (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+SORT(18)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   JOIN(11)(INNER)
+     => Join Cond: ?substr_1 (TEXT) = ?substr_2 (TEXT)
+     => target list: default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(5) ?substr_1 (TEXT), ?substr_2 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+      SCAN(17) on eb_0000000000000_0000_000004
+        => out schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+        => in schema: {(3) ?substr_1 (TEXT), default.n1.n_name (TEXT), default.n1.n_nationkey (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+        => in schema: {(2) default.n2.n_name (TEXT), default.n2.?substr_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=RANGE_SHUFFLE, key=default.n1.n_nationkey (INT4), default.n2.n_name (TEXT), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(8)
+  => Sort Keys: default.n1.n_nationkey (INT4) (asc),default.n2.n_name (TEXT) (asc)
+   SCAN(19) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (TEXT)}
+     => in schema: {(3) default.n1.n_name (TEXT), default.n1.n_nationkey (INT4), default.n2.n_name (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/testComplexJoinCondition7.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.result b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.result
new file mode 100644
index 0000000..9b278c8
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testComplexJoinCondition7.result
@@ -0,0 +1,56 @@
+n_nationkey,n_name,n_name
+-------------------------------
+0,ALGERIA,ALGERIA
+0,ALGERIA,ALGERIA
+1,ARGENTINA,ARGENTINA
+1,ARGENTINA,ARGENTINA
+2,BRAZIL,BRAZIL
+2,BRAZIL,BRAZIL
+3,CANADA,CANADA
+3,CANADA,CANADA
+4,EGYPT,EGYPT
+4,EGYPT,EGYPT
+5,ETHIOPIA,ETHIOPIA
+5,ETHIOPIA,ETHIOPIA
+6,FRANCE,FRANCE
+6,FRANCE,FRANCE
+7,GERMANY,GERMANY
+7,GERMANY,GERMANY
+8,INDIA,INDIA
+8,INDIA,INDIA
+9,INDONESIA,INDONESIA
+9,INDONESIA,INDONESIA
+10,IRAN,IRAN
+10,IRAN,IRAN
+11,IRAQ,IRAQ
+11,IRAQ,IRAQ
+12,JAPAN,JAPAN
+12,JAPAN,JAPAN
+13,JORDAN,JORDAN
+13,JORDAN,JORDAN
+14,KENYA,KENYA
+14,KENYA,KENYA
+15,MOROCCO,MOROCCO
+15,MOROCCO,MOROCCO
+16,MOZAMBIQUE,MOZAMBIQUE
+16,MOZAMBIQUE,MOZAMBIQUE
+17,PERU,PERU
+17,PERU,PERU
+18,CHINA,CHINA
+18,CHINA,CHINA
+19,ROMANIA,ROMANIA
+19,ROMANIA,ROMANIA
+20,SAUDI ARABIA,SAUDI ARABIA
+20,SAUDI ARABIA,SAUDI ARABIA
+21,VIETNAM,VIETNAM
+21,VIETNAM,VIETNAM
+22,RUSSIA,RUSSIA
+22,RUSSIA,RUSSIA
+23,UNITED KINGDOM,UNITED KINGDOM
+23,UNITED KINGDOM,UNITED KINGDOM
+23,UNITED KINGDOM,UNITED STATES
+23,UNITED KINGDOM,UNITED STATES
+24,UNITED STATES,UNITED KINGDOM
+24,UNITED STATES,UNITED KINGDOM
+24,UNITED STATES,UNITED STATES
+24,UNITED STATES,UNITED STATES

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithJson2.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithJson2.result b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithJson2.result
new file mode 100644
index 0000000..155ba42
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithJson2.result
@@ -0,0 +1,5 @@
+n_nationkey,n_name,n_regionkey,n_comment,ps_availqty,s_suppkey
+-------------------------------
+1,ARGENTINA,1,al foxes promise slyly according to the regular accounts. bold requests alon,8895,3
+5,ETHIOPIA,0,ven packages wake quickly. regu,3325,2
+15,MOROCCO,0,rns. blithely bold courts among the closely regular packages use furiously bold platelets?,4651,4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
new file mode 100644
index 0000000..9f790f3
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash.plan
@@ -0,0 +1,116 @@
+explain
+-------------------------------
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+   TABLE_SUBQUERY(4) as default.t
+     => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+     => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+     => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(1) on default.region as r
+           => target list: default.r.r_regionkey (INT4)
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+         SCAN(0) on default.nation as n
+           => filter: default.n.n_name (TEXT) = MOROCCO
+           => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000003
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+4: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.n
+ 1: type=Broadcast, tables=default.r
+
+TABLE_SUBQUERY(4) as default.t
+  => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+  => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+  => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.n.n_nationkey (INT4), name (TEXT), default.n.n_regionkey (INT4), default.n.n_comment (TEXT)
+     => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+     => in  schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(1) on default.region as r
+           => target list: default.r.r_regionkey (INT4)
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+         SCAN(0) on default.nation as n
+           => filter: default.n.n_name (TEXT) = MOROCCO
+           => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+SCAN(5) on default.supplier as s
+  => target list: default.s.s_nationkey (INT4)
+  => out schema: {(1) default.s.s_nationkey (INT4)}
+  => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(14) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(1) default.s.s_nationkey (INT4)}
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+     => in schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+
+=======================================================
+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/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..59f15f1
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Hash_NoBroadcast.plan
@@ -0,0 +1,142 @@
+explain
+-------------------------------
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+   TABLE_SUBQUERY(4) as default.t
+     => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+     => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+     => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(1) on default.region as r
+           => target list: default.r.r_regionkey (INT4)
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+         SCAN(0) on default.nation as n
+           => filter: default.n.n_name (TEXT) = MOROCCO
+           => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_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
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
+
+SCAN(0) on default.nation as n
+  => filter: default.n.n_name (TEXT) = MOROCCO
+  => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+  => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+  => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
+
+SCAN(1) on default.region as r
+  => target list: default.r.r_regionkey (INT4)
+  => out schema: {(1) default.r.r_regionkey (INT4)}
+  => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.n.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.r.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.t
+  => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+  => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+  => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.n.n_nationkey (INT4), name (TEXT), default.n.n_regionkey (INT4), default.n.n_comment (TEXT)
+     => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+     => in  schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(14) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(1) default.r.r_regionkey (INT4)}
+         SCAN(13) on eb_0000000000000_0000_000001
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+SCAN(5) on default.supplier as s
+  => target list: default.s.s_nationkey (INT4)
+  => out schema: {(1) default.s.s_nationkey (INT4)}
+  => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(16) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(1) default.s.s_nationkey (INT4)}
+   SCAN(15) on eb_0000000000000_0000_000003
+     => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+     => in schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+
+=======================================================
+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/testJoinWithMultipleJoinQual2.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
new file mode 100644
index 0000000..9f790f3
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestInnerJoinWithSubQuery/testJoinWithMultipleJoinQual2.Sort.plan
@@ -0,0 +1,116 @@
+explain
+-------------------------------
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(5) on default.supplier as s
+     => target list: default.s.s_nationkey (INT4)
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+   TABLE_SUBQUERY(4) as default.t
+     => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+     => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+     => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(1) on default.region as r
+           => target list: default.r.r_regionkey (INT4)
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+         SCAN(0) on default.nation as n
+           => filter: default.n.n_name (TEXT) = MOROCCO
+           => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000003
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+4: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.n
+ 1: type=Broadcast, tables=default.r
+
+TABLE_SUBQUERY(4) as default.t
+  => Targets: default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)
+  => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+  => in  schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.n.n_nationkey (INT4), name (TEXT), default.n.n_regionkey (INT4), default.n.n_comment (TEXT)
+     => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+     => in  schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+      JOIN(10)(INNER)
+        => Join Cond: default.n.n_regionkey (INT4) = default.r.r_regionkey (INT4)
+        => target list: default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)
+        => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+        => in schema: {(5) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), default.r.r_regionkey (INT4), name (TEXT)}
+         SCAN(1) on default.region as r
+           => target list: default.r.r_regionkey (INT4)
+           => out schema: {(1) default.r.r_regionkey (INT4)}
+           => in schema: {(3) default.r.r_comment (TEXT), default.r.r_name (TEXT), default.r.r_regionkey (INT4)}
+         SCAN(0) on default.nation as n
+           => filter: default.n.n_name (TEXT) = MOROCCO
+           => target list: default.n.n_comment (TEXT), default.n.n_name (TEXT) as name, default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)
+           => out schema: {(4) default.n.n_comment (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4), name (TEXT)}
+           => in schema: {(4) default.n.n_comment (TEXT), default.n.n_name (TEXT), default.n.n_nationkey (INT4), default.n.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+SCAN(5) on default.supplier as s
+  => target list: default.s.s_nationkey (INT4)
+  => out schema: {(1) default.s.s_nationkey (INT4)}
+  => in schema: {(7) default.s.s_acctbal (FLOAT8), default.s.s_address (TEXT), default.s.s_comment (TEXT), default.s.s_name (TEXT), default.s.s_nationkey (INT4), default.s.s_phone (TEXT), default.s.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.t.n_nationkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.s.s_nationkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.s.s_nationkey (INT4) = default.t.n_nationkey (INT4)
+  => target list: default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)
+  => out schema: {(4) default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+  => in schema: {(5) default.s.s_nationkey (INT4), default.t.n_comment (TEXT), default.t.n_nationkey (INT4), default.t.n_regionkey (INT4), default.t.name (TEXT)}
+   SCAN(14) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.s.s_nationkey (INT4)}
+     => in schema: {(1) default.s.s_nationkey (INT4)}
+   SCAN(13) on eb_0000000000000_0000_000003
+     => out schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+     => in schema: {(4) default.t.n_nationkey (INT4), default.t.name (TEXT), default.t.n_regionkey (INT4), default.t.n_comment (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================


Mime
View raw message