tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [02/47] tajo git commit: TAJO-1577: Add test cases to verify join plans. (jihoon)
Date Tue, 19 May 2015 02:07:27 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..0fe36c0
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash_NoBroadcast.plan
@@ -0,0 +1,156 @@
+explain
+-------------------------------
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      JOIN(9)(LEFT_OUTER)
+        => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+        => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+         TABLE_SUBQUERY(4) as default.b
+           => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+           => out schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+           => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+            GROUP_BY(2)(c_custkey)
+              => exprs: (min(default.customer.c_name (TEXT)))
+              => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+              => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+              => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+               SCAN(1) on default.customer
+                 => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+                 => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+                 => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+         SCAN(0) on default.customer as a
+           => target list: default.a.c_custkey (INT4)
+           => out schema: {(1) default.a.c_custkey (INT4)}
+           => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+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_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000001
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+GROUP_BY(11)(c_custkey)
+  => exprs: (min(default.customer.c_name (TEXT)))
+  => target list: default.customer.c_custkey (INT4), ?min_2 (TEXT)
+  => out schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+  => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+   SCAN(1) on default.customer
+     => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+     => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.b
+  => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+  => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+  => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.customer.c_custkey (INT4), min_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+     => in  schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+      GROUP_BY(2)(c_custkey)
+        => exprs: (min(?min_2 (TEXT)))
+        => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+        => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+        => in schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+         SCAN(12) on eb_0000000000000_0000_000002
+           => out schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+           => in schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer as a
+  => target list: default.a.c_custkey (INT4)
+  => out schema: {(1) default.a.c_custkey (INT4)}
+  => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SORT(15)
+  => Sort Keys: default.a.c_custkey (INT4) (asc)
+   JOIN(9)(LEFT_OUTER)
+     => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+     => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+     => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+     => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+      SCAN(14) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+        => in schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+      SCAN(13) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.c_custkey (INT4)}
+        => in schema: {(1) default.a.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      SCAN(16) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(2) default.a.c_custkey (INT4), default.b.min_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/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort.plan
new file mode 100644
index 0000000..0fe36c0
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort.plan
@@ -0,0 +1,156 @@
+explain
+-------------------------------
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      JOIN(9)(LEFT_OUTER)
+        => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+        => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+         TABLE_SUBQUERY(4) as default.b
+           => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+           => out schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+           => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+            GROUP_BY(2)(c_custkey)
+              => exprs: (min(default.customer.c_name (TEXT)))
+              => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+              => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+              => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+               SCAN(1) on default.customer
+                 => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+                 => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+                 => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+         SCAN(0) on default.customer as a
+           => target list: default.a.c_custkey (INT4)
+           => out schema: {(1) default.a.c_custkey (INT4)}
+           => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+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_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000001
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+GROUP_BY(11)(c_custkey)
+  => exprs: (min(default.customer.c_name (TEXT)))
+  => target list: default.customer.c_custkey (INT4), ?min_2 (TEXT)
+  => out schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+  => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+   SCAN(1) on default.customer
+     => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+     => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.b
+  => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+  => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+  => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.customer.c_custkey (INT4), min_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+     => in  schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+      GROUP_BY(2)(c_custkey)
+        => exprs: (min(?min_2 (TEXT)))
+        => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+        => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+        => in schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+         SCAN(12) on eb_0000000000000_0000_000002
+           => out schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+           => in schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer as a
+  => target list: default.a.c_custkey (INT4)
+  => out schema: {(1) default.a.c_custkey (INT4)}
+  => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SORT(15)
+  => Sort Keys: default.a.c_custkey (INT4) (asc)
+   JOIN(9)(LEFT_OUTER)
+     => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+     => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+     => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+     => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+      SCAN(14) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+        => in schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+      SCAN(13) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.c_custkey (INT4)}
+        => in schema: {(1) default.a.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      SCAN(16) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(2) default.a.c_custkey (INT4), default.b.min_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/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..0fe36c0
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Sort_NoBroadcast.plan
@@ -0,0 +1,156 @@
+explain
+-------------------------------
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      JOIN(9)(LEFT_OUTER)
+        => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+        => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+         TABLE_SUBQUERY(4) as default.b
+           => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+           => out schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+           => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+            GROUP_BY(2)(c_custkey)
+              => exprs: (min(default.customer.c_name (TEXT)))
+              => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+              => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+              => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+               SCAN(1) on default.customer
+                 => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+                 => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+                 => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+         SCAN(0) on default.customer as a
+           => target list: default.a.c_custkey (INT4)
+           => out schema: {(1) default.a.c_custkey (INT4)}
+           => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+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_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000001
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+GROUP_BY(11)(c_custkey)
+  => exprs: (min(default.customer.c_name (TEXT)))
+  => target list: default.customer.c_custkey (INT4), ?min_2 (TEXT)
+  => out schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+  => in schema:{(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+   SCAN(1) on default.customer
+     => target list: default.customer.c_custkey (INT4), default.customer.c_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.customer.c_name (TEXT)}
+     => in schema: {(8) default.customer.c_acctbal (FLOAT8), default.customer.c_address (TEXT), default.customer.c_comment (TEXT), default.customer.c_custkey (INT4), default.customer.c_mktsegment (TEXT), default.customer.c_name (TEXT), default.customer.c_nationkey (INT4), default.customer.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.b
+  => Targets: default.b.min_name (TEXT), default.b.c_custkey (INT4)
+  => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+  => in  schema: {(2) default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+   PROJECTION(3)
+     => Targets: default.customer.c_custkey (INT4), min_name (TEXT)
+     => out schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+     => in  schema: {(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+      GROUP_BY(2)(c_custkey)
+        => exprs: (min(?min_2 (TEXT)))
+        => target list: default.customer.c_custkey (INT4), min_name (TEXT)
+        => out schema:{(2) default.customer.c_custkey (INT4), min_name (TEXT)}
+        => in schema:{(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+         SCAN(12) on eb_0000000000000_0000_000002
+           => out schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+           => in schema: {(2) default.customer.c_custkey (INT4), ?min_2 (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer as a
+  => target list: default.a.c_custkey (INT4)
+  => out schema: {(1) default.a.c_custkey (INT4)}
+  => in schema: {(8) default.a.c_acctbal (FLOAT8), default.a.c_address (TEXT), default.a.c_comment (TEXT), default.a.c_custkey (INT4), default.a.c_mktsegment (TEXT), default.a.c_name (TEXT), default.a.c_nationkey (INT4), default.a.c_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 4 (type=HASH_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.b.c_custkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+SORT(15)
+  => Sort Keys: default.a.c_custkey (INT4) (asc)
+   JOIN(9)(LEFT_OUTER)
+     => Join Cond: default.a.c_custkey (INT4) = default.b.c_custkey (INT4)
+     => target list: default.a.c_custkey (INT4), default.b.min_name (TEXT)
+     => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+     => in schema: {(3) default.a.c_custkey (INT4), default.b.c_custkey (INT4), default.b.min_name (TEXT)}
+      SCAN(14) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+        => in schema: {(2) default.b.min_name (TEXT), default.b.c_custkey (INT4)}
+      SCAN(13) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.c_custkey (INT4)}
+        => in schema: {(1) default.a.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.a.c_custkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(7)
+  => Targets: default.a.c_custkey (INT4), 123 as const_val, default.b.min_name (TEXT)
+  => out schema: {(3) const_val (INT8), default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+  => in  schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+   SORT(6)
+     => Sort Keys: default.a.c_custkey (INT4) (asc)
+      SCAN(16) on eb_0000000000000_0000_000004
+        => out schema: {(2) default.a.c_custkey (INT4), default.b.min_name (TEXT)}
+        => in schema: {(2) default.a.c_custkey (INT4), default.b.min_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/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.result b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.result
new file mode 100644
index 0000000..ab1487b
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.result
@@ -0,0 +1,7 @@
+c_custkey,const_val,min_name
+-------------------------------
+1,123,Customer#000000001
+2,123,Customer#000000002
+3,123,Customer#000000003
+4,123,Customer#000000004
+5,123,Customer#000000005

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash.plan
new file mode 100644
index 0000000..a978415
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash.plan
@@ -0,0 +1,141 @@
+explain
+-------------------------------
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(5) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(1) default.b.id (INT4)}
+         JOIN(10)(INNER)
+           => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+            SCAN(1) on default.jointable12
+              => filter: default.jointable12.id (INT4) > 10
+              => target list: default.jointable12.id (INT4)
+              => out schema: {(1) default.jointable12.id (INT4)}
+              => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+            SCAN(2) on default.lineitem
+              => target list: default.lineitem.l_orderkey (INT4)
+              => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+      SCAN(0) on default.jointable11 as a
+        => target list: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000007
+   |-eb_0000000000000_0000_000006
+      |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+4: eb_0000000000000_0000_000006
+5: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SCAN(0) on default.jointable11 as a
+  => target list: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.lineitem
+ 1: type=Broadcast, tables=default.jointable12
+
+TABLE_SUBQUERY(5) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(1) default.b.id (INT4)}
+   PROJECTION(4)
+     => Targets: default.jointable12.id (INT4)
+     => out schema: {(1) default.jointable12.id (INT4)}
+     => in  schema: {(1) default.jointable12.id (INT4)}
+      JOIN(10)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4)
+        => out schema: {(1) default.jointable12.id (INT4)}
+        => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+         SCAN(1) on default.jointable12
+           => filter: default.jointable12.id (INT4) > 10
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(2) on default.lineitem
+           => target list: default.lineitem.l_orderkey (INT4)
+           => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SORT(15)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(14) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(13) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000005
+
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   SCAN(16) on eb_0000000000000_0000_000005
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..703f32c
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Hash_NoBroadcast.plan
@@ -0,0 +1,167 @@
+explain
+-------------------------------
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(5) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(1) default.b.id (INT4)}
+         JOIN(10)(INNER)
+           => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+            SCAN(1) on default.jointable12
+              => filter: default.jointable12.id (INT4) > 10
+              => target list: default.jointable12.id (INT4)
+              => out schema: {(1) default.jointable12.id (INT4)}
+              => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+            SCAN(2) on default.lineitem
+              => target list: default.lineitem.l_orderkey (INT4)
+              => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+      SCAN(0) on default.jointable11 as a
+        => target list: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000007
+   |-eb_0000000000000_0000_000006
+      |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+            |-eb_0000000000000_0000_000003
+            |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000001
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+SCAN(2) on default.lineitem
+  => target list: default.lineitem.l_orderkey (INT4)
+  => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+SCAN(1) on default.jointable12
+  => filter: default.jointable12.id (INT4) > 10
+  => target list: default.jointable12.id (INT4)
+  => out schema: {(1) default.jointable12.id (INT4)}
+  => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+TABLE_SUBQUERY(5) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(1) default.b.id (INT4)}
+   PROJECTION(4)
+     => Targets: default.jointable12.id (INT4)
+     => out schema: {(1) default.jointable12.id (INT4)}
+     => in  schema: {(1) default.jointable12.id (INT4)}
+      JOIN(10)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4)
+        => out schema: {(1) default.jointable12.id (INT4)}
+        => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+         SCAN(14) on eb_0000000000000_0000_000003
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(1) default.jointable12.id (INT4)}
+         SCAN(13) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+           => in schema: {(1) default.lineitem.l_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SCAN(0) on default.jointable11 as a
+  => target list: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SORT(17)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(16) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000005
+
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   SCAN(18) on eb_0000000000000_0000_000005
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort.plan
new file mode 100644
index 0000000..a978415
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort.plan
@@ -0,0 +1,141 @@
+explain
+-------------------------------
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(5) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(1) default.b.id (INT4)}
+         JOIN(10)(INNER)
+           => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+            SCAN(1) on default.jointable12
+              => filter: default.jointable12.id (INT4) > 10
+              => target list: default.jointable12.id (INT4)
+              => out schema: {(1) default.jointable12.id (INT4)}
+              => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+            SCAN(2) on default.lineitem
+              => target list: default.lineitem.l_orderkey (INT4)
+              => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+      SCAN(0) on default.jointable11 as a
+        => target list: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000007
+   |-eb_0000000000000_0000_000006
+      |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+4: eb_0000000000000_0000_000006
+5: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SCAN(0) on default.jointable11 as a
+  => target list: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.lineitem
+ 1: type=Broadcast, tables=default.jointable12
+
+TABLE_SUBQUERY(5) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(1) default.b.id (INT4)}
+   PROJECTION(4)
+     => Targets: default.jointable12.id (INT4)
+     => out schema: {(1) default.jointable12.id (INT4)}
+     => in  schema: {(1) default.jointable12.id (INT4)}
+      JOIN(10)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4)
+        => out schema: {(1) default.jointable12.id (INT4)}
+        => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+         SCAN(1) on default.jointable12
+           => filter: default.jointable12.id (INT4) > 10
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(2) on default.lineitem
+           => target list: default.lineitem.l_orderkey (INT4)
+           => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SORT(15)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(14) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(13) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000005
+
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   SCAN(16) on eb_0000000000000_0000_000005
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..703f32c
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.Sort_NoBroadcast.plan
@@ -0,0 +1,167 @@
+explain
+-------------------------------
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(5) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(1) default.b.id (INT4)}
+         JOIN(10)(INNER)
+           => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+           => target list: default.jointable12.id (INT4)
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+            SCAN(1) on default.jointable12
+              => filter: default.jointable12.id (INT4) > 10
+              => target list: default.jointable12.id (INT4)
+              => out schema: {(1) default.jointable12.id (INT4)}
+              => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+            SCAN(2) on default.lineitem
+              => target list: default.lineitem.l_orderkey (INT4)
+              => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+      SCAN(0) on default.jointable11 as a
+        => target list: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000007)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000007
+   |-eb_0000000000000_0000_000006
+      |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+            |-eb_0000000000000_0000_000003
+            |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000002
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000001
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+SCAN(2) on default.lineitem
+  => target list: default.lineitem.l_orderkey (INT4)
+  => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+SCAN(1) on default.jointable12
+  => filter: default.jointable12.id (INT4) > 10
+  => target list: default.jointable12.id (INT4)
+  => out schema: {(1) default.jointable12.id (INT4)}
+  => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 4 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+TABLE_SUBQUERY(5) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(1) default.b.id (INT4)}
+   PROJECTION(4)
+     => Targets: default.jointable12.id (INT4)
+     => out schema: {(1) default.jointable12.id (INT4)}
+     => in  schema: {(1) default.jointable12.id (INT4)}
+      JOIN(10)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4)
+        => out schema: {(1) default.jointable12.id (INT4)}
+        => in schema: {(2) default.jointable12.id (INT4), default.lineitem.l_orderkey (INT4)}
+         SCAN(14) on eb_0000000000000_0000_000003
+           => out schema: {(1) default.jointable12.id (INT4)}
+           => in schema: {(1) default.jointable12.id (INT4)}
+         SCAN(13) on eb_0000000000000_0000_000002
+           => out schema: {(1) default.lineitem.l_orderkey (INT4)}
+           => in schema: {(1) default.lineitem.l_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SCAN(0) on default.jointable11 as a
+  => target list: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.a.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+SORT(17)
+  => Sort Keys: default.a.id (INT4) (asc)
+   JOIN(11)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.a.id (INT4), default.b.id (INT4)
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(16) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(15) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.a.id (INT4)}
+        => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 5 => 6 (type=RANGE_SHUFFLE, key=default.a.id (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000005
+
+SORT(7)
+  => Sort Keys: default.a.id (INT4) (asc)
+   SCAN(18) on eb_0000000000000_0000_000005
+     => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.result b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.result
new file mode 100644
index 0000000..8a07426
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery1.1.result
@@ -0,0 +1,7 @@
+id,id
+-------------------------------
+1,null
+2,null
+3,null
+4,null
+5,null

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash.plan
new file mode 100644
index 0000000..c4c25da
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash.plan
@@ -0,0 +1,116 @@
+explain
+-------------------------------
+JOIN(10)(LEFT_OUTER)
+  => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+  => target list: default.a.id (INT4), default.b.id (INT4)
+  => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+   SCAN(5) on default.jointable11 as b
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
+   TABLE_SUBQUERY(4) as default.a
+     => Targets: default.a.id (INT4)
+     => out schema: {(1) default.a.id (INT4)}
+     => in  schema: {(3) default.a.id (INT4), default.a.l_shipdate (TEXT), default.a.name (TEXT)}
+      JOIN(9)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+        => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+         SCAN(0) on default.jointable12
+           => filter: default.jointable12.id (INT4) > 10
+           => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
+           => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(1) on default.lineitem
+           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
+           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+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.a.id (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.lineitem
+ 1: type=Broadcast, tables=default.jointable12
+
+TABLE_SUBQUERY(4) as default.a
+  => Targets: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in  schema: {(3) default.a.id (INT4), default.a.name (TEXT), default.a.l_shipdate (TEXT)}
+   PROJECTION(3)
+     => Targets: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+     => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+     => in  schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+      JOIN(9)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+        => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+         SCAN(0) on default.jointable12
+           => filter: default.jointable12.id (INT4) > 10
+           => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
+           => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(1) on default.lineitem
+           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
+           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+SCAN(5) on default.jointable11 as b
+  => target list: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+JOIN(10)(LEFT_OUTER)
+  => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+  => target list: default.a.id (INT4), default.b.id (INT4)
+  => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+   SCAN(13) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(1) default.b.id (INT4)}
+   SCAN(12) on eb_0000000000000_0000_000003
+     => out schema: {(1) default.a.id (INT4)}
+     => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..107e1fa
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Hash_NoBroadcast.plan
@@ -0,0 +1,142 @@
+explain
+-------------------------------
+JOIN(10)(LEFT_OUTER)
+  => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+  => target list: default.a.id (INT4), default.b.id (INT4)
+  => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+   SCAN(5) on default.jointable11 as b
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
+   TABLE_SUBQUERY(4) as default.a
+     => Targets: default.a.id (INT4)
+     => out schema: {(1) default.a.id (INT4)}
+     => in  schema: {(3) default.a.id (INT4), default.a.l_shipdate (TEXT), default.a.name (TEXT)}
+      JOIN(9)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+        => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+         SCAN(0) on default.jointable12
+           => filter: default.jointable12.id (INT4) > 10
+           => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
+           => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(1) on default.lineitem
+           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
+           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+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.lineitem.l_orderkey (INT4), num=32)
+
+SCAN(1) on default.lineitem
+  => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
+  => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+SCAN(0) on default.jointable12
+  => filter: default.jointable12.id (INT4) > 10
+  => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
+  => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+  => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.jointable12.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+TABLE_SUBQUERY(4) as default.a
+  => Targets: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in  schema: {(3) default.a.id (INT4), default.a.name (TEXT), default.a.l_shipdate (TEXT)}
+   PROJECTION(3)
+     => Targets: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+     => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+     => in  schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+      JOIN(9)(INNER)
+        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+        => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+        => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+         SCAN(13) on eb_0000000000000_0000_000002
+           => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+         SCAN(12) on eb_0000000000000_0000_000001
+           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+           => in schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+SCAN(5) on default.jointable11 as b
+  => target list: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+JOIN(10)(LEFT_OUTER)
+  => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+  => target list: default.a.id (INT4), default.b.id (INT4)
+  => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+  => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+   SCAN(15) on eb_0000000000000_0000_000004
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(1) default.b.id (INT4)}
+   SCAN(14) on eb_0000000000000_0000_000003
+     => out schema: {(1) default.a.id (INT4)}
+     => in schema: {(1) default.a.id (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================


Mime
View raw message