tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [03/57] [abbrv] tajo git commit: TAJO-1577: Add test cases to verify join plans. (jihoon)
Date Mon, 25 May 2015 14:35:56 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..b9b9adf
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Hash_NoBroadcast.plan
@@ -0,0 +1,199 @@
+explain
+-------------------------------
+GROUP_BY(11)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(8) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+         GROUP_BY(6)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(4) on default.jointable_large
+              => filter: default.jointable_large.id (INT4) < 200
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+      TABLE_SUBQUERY(3) as default.a
+        => Targets: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+         GROUP_BY(1)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(0) on default.jointable_large
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.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_000001
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000002
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(15)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_4 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(0) on default.jointable_large
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.a
+  => Targets: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+   PROJECTION(2)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(1)(id)
+        => exprs: (count(?count_4 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+         SCAN(16) on eb_0000000000000_0000_000001
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(17)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_5 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(4) on default.jointable_large
+     => filter: default.jointable_large.id (INT4) < 200
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+TABLE_SUBQUERY(8) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+   PROJECTION(7)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(6)(id)
+        => exprs: (count(?count_5 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+         SCAN(18) on eb_0000000000000_0000_000003
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(21)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count_6 (INT8)
+  => out schema:{(1) ?count_6 (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(20) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(19) on eb_0000000000000_0000_000002
+        => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(11)()
+  => exprs: (count(?count_6 (INT8)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) ?count_6 (INT8)}
+   SCAN(22) on eb_0000000000000_0000_000005
+     => out schema: {(1) ?count_6 (INT8)}
+     => in schema: {(1) ?count_6 (INT8)}
+
+=======================================================
+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/testJoinWithDifferentShuffleKey.1.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort.plan
new file mode 100644
index 0000000..b9b9adf
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort.plan
@@ -0,0 +1,199 @@
+explain
+-------------------------------
+GROUP_BY(11)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(8) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+         GROUP_BY(6)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(4) on default.jointable_large
+              => filter: default.jointable_large.id (INT4) < 200
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+      TABLE_SUBQUERY(3) as default.a
+        => Targets: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+         GROUP_BY(1)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(0) on default.jointable_large
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.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_000001
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000002
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(15)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_4 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(0) on default.jointable_large
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.a
+  => Targets: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+   PROJECTION(2)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(1)(id)
+        => exprs: (count(?count_4 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+         SCAN(16) on eb_0000000000000_0000_000001
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(17)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_5 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(4) on default.jointable_large
+     => filter: default.jointable_large.id (INT4) < 200
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+TABLE_SUBQUERY(8) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+   PROJECTION(7)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(6)(id)
+        => exprs: (count(?count_5 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+         SCAN(18) on eb_0000000000000_0000_000003
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(21)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count_6 (INT8)
+  => out schema:{(1) ?count_6 (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(20) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(19) on eb_0000000000000_0000_000002
+        => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(11)()
+  => exprs: (count(?count_6 (INT8)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) ?count_6 (INT8)}
+   SCAN(22) on eb_0000000000000_0000_000005
+     => out schema: {(1) ?count_6 (INT8)}
+     => in schema: {(1) ?count_6 (INT8)}
+
+=======================================================
+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/testJoinWithDifferentShuffleKey.1.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..b9b9adf
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.Sort_NoBroadcast.plan
@@ -0,0 +1,199 @@
+explain
+-------------------------------
+GROUP_BY(11)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      TABLE_SUBQUERY(8) as default.b
+        => Targets: default.b.id (INT4)
+        => out schema: {(1) default.b.id (INT4)}
+        => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+         GROUP_BY(6)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(4) on default.jointable_large
+              => filter: default.jointable_large.id (INT4) < 200
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+      TABLE_SUBQUERY(3) as default.a
+        => Targets: default.a.id (INT4)
+        => out schema: {(1) default.a.id (INT4)}
+        => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+         GROUP_BY(1)(id)
+           => exprs: (count())
+           => target list: default.jointable_large.id (INT4), cnt (INT8)
+           => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+           => in schema:{(1) default.jointable_large.id (INT4)}
+            SCAN(0) on default.jointable_large
+              => target list: default.jointable_large.id (INT4)
+              => out schema: {(1) default.jointable_large.id (INT4)}
+              => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.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_000001
+2: eb_0000000000000_0000_000003
+3: eb_0000000000000_0000_000002
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000007
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(15)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_4 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(0) on default.jointable_large
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.a
+  => Targets: default.a.id (INT4)
+  => out schema: {(1) default.a.id (INT4)}
+  => in  schema: {(2) default.a.cnt (INT8), default.a.id (INT4)}
+   PROJECTION(2)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(1)(id)
+        => exprs: (count(?count_4 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+         SCAN(16) on eb_0000000000000_0000_000001
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_4 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+GROUP_BY(17)(id)
+  => exprs: (count())
+  => target list: default.jointable_large.id (INT4), ?count_5 (INT8)
+  => out schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+  => in schema:{(1) default.jointable_large.id (INT4)}
+   SCAN(4) on default.jointable_large
+     => filter: default.jointable_large.id (INT4) < 200
+     => target list: default.jointable_large.id (INT4)
+     => out schema: {(1) default.jointable_large.id (INT4)}
+     => in schema: {(2) default.jointable_large.id (INT4), default.jointable_large.name (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=default.jointable_large.id (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+
+TABLE_SUBQUERY(8) as default.b
+  => Targets: default.b.id (INT4)
+  => out schema: {(1) default.b.id (INT4)}
+  => in  schema: {(2) default.b.cnt (INT8), default.b.id (INT4)}
+   PROJECTION(7)
+     => Targets: default.jointable_large.id (INT4), cnt (INT8)
+     => out schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+     => in  schema: {(2) cnt (INT8), default.jointable_large.id (INT4)}
+      GROUP_BY(6)(id)
+        => exprs: (count(?count_5 (INT8)))
+        => target list: default.jointable_large.id (INT4), cnt (INT8)
+        => out schema:{(2) cnt (INT8), default.jointable_large.id (INT4)}
+        => in schema:{(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+         SCAN(18) on eb_0000000000000_0000_000003
+           => out schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+           => in schema: {(2) default.jointable_large.id (INT4), ?count_5 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(21)()
+  => exprs: (count(default.b.id (INT4)))
+  => target list: ?count_6 (INT8)
+  => out schema:{(1) ?count_6 (INT8)}
+  => in schema:{(1) default.b.id (INT4)}
+   JOIN(13)(LEFT_OUTER)
+     => Join Cond: default.a.id (INT4) = default.b.id (INT4)
+     => target list: default.b.id (INT4)
+     => out schema: {(1) default.b.id (INT4)}
+     => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
+      SCAN(20) on eb_0000000000000_0000_000004
+        => out schema: {(1) default.b.id (INT4)}
+        => in schema: {(1) default.b.id (INT4)}
+      SCAN(19) on eb_0000000000000_0000_000002
+        => 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=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(11)()
+  => exprs: (count(?count_6 (INT8)))
+  => target list: ?count (INT8)
+  => out schema:{(1) ?count (INT8)}
+  => in schema:{(1) ?count_6 (INT8)}
+   SCAN(22) on eb_0000000000000_0000_000005
+     => out schema: {(1) ?count_6 (INT8)}
+     => in schema: {(1) ?count_6 (INT8)}
+
+=======================================================
+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/testJoinWithDifferentShuffleKey.1.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.result b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.result
new file mode 100644
index 0000000..bb4374a
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testJoinWithDifferentShuffleKey.1.result
@@ -0,0 +1,3 @@
+?count
+-------------------------------
+200

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash.plan
new file mode 100644
index 0000000..e4156aa
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash.plan
@@ -0,0 +1,125 @@
+explain
+-------------------------------
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      JOIN(8)(LEFT_OUTER)
+        => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+        => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+         TABLE_SUBQUERY(3) as default.o
+           => Targets: default.o.o_orderkey (INT4)
+           => out schema: {(1) default.o.o_orderkey (INT4)}
+           => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+            SCAN(1) on default.orders
+              => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+              => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+         SCAN(0) on default.customer
+           => target list: default.customer.c_custkey (INT4)
+           => out schema: {(1) default.customer.c_custkey (INT4)}
+           => 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)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer
+  => target list: default.customer.c_custkey (INT4)
+  => out schema: {(1) default.customer.c_custkey (INT4)}
+  => 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_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.o
+  => Targets: default.o.o_orderkey (INT4)
+  => out schema: {(1) default.o.o_orderkey (INT4)}
+  => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+   PROJECTION(2)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4), default.orders.o_orderstatus (TEXT), default.orders.o_totalprice (FLOAT8), default.orders.o_orderdate (TEXT), default.orders.o_orderpriority (TEXT), default.orders.o_clerk (TEXT), default.orders.o_shippriority (INT4), default.orders.o_comment (TEXT)
+     => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+     => in  schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+      SCAN(1) on default.orders
+        => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+        => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+   JOIN(8)(LEFT_OUTER)
+     => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+     => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+     => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.o.o_orderkey (INT4)}
+        => in schema: {(1) default.o.o_orderkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.customer.c_custkey (INT4)}
+        => in schema: {(1) default.customer.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..e4156aa
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Hash_NoBroadcast.plan
@@ -0,0 +1,125 @@
+explain
+-------------------------------
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      JOIN(8)(LEFT_OUTER)
+        => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+        => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+         TABLE_SUBQUERY(3) as default.o
+           => Targets: default.o.o_orderkey (INT4)
+           => out schema: {(1) default.o.o_orderkey (INT4)}
+           => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+            SCAN(1) on default.orders
+              => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+              => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+         SCAN(0) on default.customer
+           => target list: default.customer.c_custkey (INT4)
+           => out schema: {(1) default.customer.c_custkey (INT4)}
+           => 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)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer
+  => target list: default.customer.c_custkey (INT4)
+  => out schema: {(1) default.customer.c_custkey (INT4)}
+  => 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_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.o
+  => Targets: default.o.o_orderkey (INT4)
+  => out schema: {(1) default.o.o_orderkey (INT4)}
+  => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+   PROJECTION(2)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4), default.orders.o_orderstatus (TEXT), default.orders.o_totalprice (FLOAT8), default.orders.o_orderdate (TEXT), default.orders.o_orderpriority (TEXT), default.orders.o_clerk (TEXT), default.orders.o_shippriority (INT4), default.orders.o_comment (TEXT)
+     => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+     => in  schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+      SCAN(1) on default.orders
+        => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+        => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+   JOIN(8)(LEFT_OUTER)
+     => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+     => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+     => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.o.o_orderkey (INT4)}
+        => in schema: {(1) default.o.o_orderkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.customer.c_custkey (INT4)}
+        => in schema: {(1) default.customer.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort.plan
new file mode 100644
index 0000000..e4156aa
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort.plan
@@ -0,0 +1,125 @@
+explain
+-------------------------------
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      JOIN(8)(LEFT_OUTER)
+        => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+        => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+         TABLE_SUBQUERY(3) as default.o
+           => Targets: default.o.o_orderkey (INT4)
+           => out schema: {(1) default.o.o_orderkey (INT4)}
+           => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+            SCAN(1) on default.orders
+              => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+              => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+         SCAN(0) on default.customer
+           => target list: default.customer.c_custkey (INT4)
+           => out schema: {(1) default.customer.c_custkey (INT4)}
+           => 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)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer
+  => target list: default.customer.c_custkey (INT4)
+  => out schema: {(1) default.customer.c_custkey (INT4)}
+  => 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_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.o
+  => Targets: default.o.o_orderkey (INT4)
+  => out schema: {(1) default.o.o_orderkey (INT4)}
+  => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+   PROJECTION(2)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4), default.orders.o_orderstatus (TEXT), default.orders.o_totalprice (FLOAT8), default.orders.o_orderdate (TEXT), default.orders.o_orderpriority (TEXT), default.orders.o_clerk (TEXT), default.orders.o_shippriority (INT4), default.orders.o_comment (TEXT)
+     => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+     => in  schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+      SCAN(1) on default.orders
+        => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+        => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+   JOIN(8)(LEFT_OUTER)
+     => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+     => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+     => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.o.o_orderkey (INT4)}
+        => in schema: {(1) default.o.o_orderkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.customer.c_custkey (INT4)}
+        => in schema: {(1) default.customer.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort_NoBroadcast.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..e4156aa
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr2.Sort_NoBroadcast.plan
@@ -0,0 +1,125 @@
+explain
+-------------------------------
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      JOIN(8)(LEFT_OUTER)
+        => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+        => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+         TABLE_SUBQUERY(3) as default.o
+           => Targets: default.o.o_orderkey (INT4)
+           => out schema: {(1) default.o.o_orderkey (INT4)}
+           => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+            SCAN(1) on default.orders
+              => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+              => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+              => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+         SCAN(0) on default.customer
+           => target list: default.customer.c_custkey (INT4)
+           => out schema: {(1) default.customer.c_custkey (INT4)}
+           => 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)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+
+SCAN(0) on default.customer
+  => target list: default.customer.c_custkey (INT4)
+  => out schema: {(1) default.customer.c_custkey (INT4)}
+  => 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_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+TABLE_SUBQUERY(3) as default.o
+  => Targets: default.o.o_orderkey (INT4)
+  => out schema: {(1) default.o.o_orderkey (INT4)}
+  => in  schema: {(9) default.o.o_clerk (TEXT), default.o.o_comment (TEXT), default.o.o_custkey (INT4), default.o.o_orderdate (TEXT), default.o.o_orderkey (INT4), default.o.o_orderpriority (TEXT), default.o.o_orderstatus (TEXT), default.o.o_shippriority (INT4), default.o.o_totalprice (FLOAT8)}
+   PROJECTION(2)
+     => Targets: default.orders.o_orderkey (INT4), default.orders.o_custkey (INT4), default.orders.o_orderstatus (TEXT), default.orders.o_totalprice (FLOAT8), default.orders.o_orderdate (TEXT), default.orders.o_orderpriority (TEXT), default.orders.o_clerk (TEXT), default.orders.o_shippriority (INT4), default.orders.o_comment (TEXT)
+     => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+     => in  schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+      SCAN(1) on default.orders
+        => target list: default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)
+        => out schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+        => in schema: {(9) default.orders.o_clerk (TEXT), default.orders.o_comment (TEXT), default.orders.o_custkey (INT4), default.orders.o_orderdate (TEXT), default.orders.o_orderkey (INT4), default.orders.o_orderpriority (TEXT), default.orders.o_orderstatus (TEXT), default.orders.o_shippriority (INT4), default.orders.o_totalprice (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.customer.c_custkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.o.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+   JOIN(8)(LEFT_OUTER)
+     => Join Cond: default.customer.c_custkey (INT4) = default.o.o_orderkey (INT4)
+     => target list: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)
+     => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+     => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.o.o_orderkey (INT4)}
+        => in schema: {(1) default.o.o_orderkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.customer.c_custkey (INT4)}
+        => in schema: {(1) default.customer.c_custkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(6)
+  => Targets: default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val as val
+  => out schema: {(3) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4), val (TEXT)}
+  => in  schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+   SORT(5)
+     => Sort Keys: default.customer.c_custkey (INT4) (asc),default.o.o_orderkey (INT4) (asc)
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+        => in schema: {(2) default.customer.c_custkey (INT4), default.o.o_orderkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

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

http://git-wip-us.apache.org/repos/asf/tajo/blob/4b1b7799/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash.plan
new file mode 100644
index 0000000..0fe36c0
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithConstantExpr3.Hash.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]
+=======================================================


Mime
View raw message