tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [11/51] [partial] tajo git commit: TAJO-1761: Separate an integration unit test kit into an independent module.
Date Fri, 14 Aug 2015 14:29:50 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort.plan
new file mode 100644
index 0000000..21e765d
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort.plan
@@ -0,0 +1,78 @@
+explain
+-------------------------------
+SORT(3)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(2) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+      SCAN(0) on default.region
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4)
+        => out schema: {(1) default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000003
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.region
+
+SORT(11)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(2) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+      SCAN(0) on default.region
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4)
+        => out schema: {(1) default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(3)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   SCAN(12) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..4250b5c
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.Sort_NoBroadcast.plan
@@ -0,0 +1,105 @@
+explain
+-------------------------------
+SORT(3)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(2) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+      SCAN(0) on default.region
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4)
+        => out schema: {(1) default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_regionkey (INT4)
+  => out schema: {(1) default.nation.n_regionkey (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => target list: default.region.r_regionkey (INT4)
+  => out schema: {(1) default.region.r_regionkey (INT4)}
+  => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), num=32)
+
+SORT(11)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(2) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(1) default.region.r_regionkey (INT4)}
+      SCAN(9) on eb_0000000000000_0000_000001
+        => out schema: {(1) default.nation.n_regionkey (INT4)}
+        => in schema: {(1) default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+SORT(3)
+  => Sort Keys: default.region.r_regionkey (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   SCAN(12) on eb_0000000000000_0000_000003
+     => out schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.result b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.result
new file mode 100644
index 0000000..774f3a8
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvals1.result
@@ -0,0 +1,27 @@
+r_regionkey,n_regionkey,plus
+-------------------------------
+0,0,0
+0,0,0
+0,0,0
+0,0,0
+0,0,0
+1,1,2
+1,1,2
+1,1,2
+1,1,2
+1,1,2
+2,2,4
+2,2,4
+2,2,4
+2,2,4
+2,2,4
+3,3,6
+3,3,6
+3,3,6
+3,3,6
+3,3,6
+4,4,8
+4,4,8
+4,4,8
+4,4,8
+4,4,8

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash.plan
new file mode 100644
index 0000000..a8f9f8b
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash.plan
@@ -0,0 +1,88 @@
+explain
+-------------------------------
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      JOIN(7)(INNER)
+        => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+        => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+         SCAN(0) on default.region
+           => filter: default.region.r_regionkey (INT4) > 0
+           => target list: default.region.r_regionkey (INT4)
+           => out schema: {(1) default.region.r_regionkey (INT4)}
+           => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+           => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000003
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.region
+
+SORT(11)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+     => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(0) on default.region
+        => filter: default.region.r_regionkey (INT4) > 0
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(12) on eb_0000000000000_0000_000003
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..936e4fc
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Hash_NoBroadcast.plan
@@ -0,0 +1,115 @@
+explain
+-------------------------------
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      JOIN(7)(INNER)
+        => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+        => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+         SCAN(0) on default.region
+           => filter: default.region.r_regionkey (INT4) > 0
+           => target list: default.region.r_regionkey (INT4)
+           => out schema: {(1) default.region.r_regionkey (INT4)}
+           => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+           => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+  => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => filter: default.region.r_regionkey (INT4) > 0
+  => target list: default.region.r_regionkey (INT4)
+  => out schema: {(1) default.region.r_regionkey (INT4)}
+  => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(11)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+     => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(1) default.region.r_regionkey (INT4)}
+      SCAN(9) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(12) on eb_0000000000000_0000_000003
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort.plan
new file mode 100644
index 0000000..a8f9f8b
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort.plan
@@ -0,0 +1,88 @@
+explain
+-------------------------------
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      JOIN(7)(INNER)
+        => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+        => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+         SCAN(0) on default.region
+           => filter: default.region.r_regionkey (INT4) > 0
+           => target list: default.region.r_regionkey (INT4)
+           => out schema: {(1) default.region.r_regionkey (INT4)}
+           => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+           => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000003
+2: eb_0000000000000_0000_000004
+3: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.region
+
+SORT(11)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+     => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(0) on default.region
+        => filter: default.region.r_regionkey (INT4) > 0
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(12) on eb_0000000000000_0000_000003
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..936e4fc
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.Sort_NoBroadcast.plan
@@ -0,0 +1,115 @@
+explain
+-------------------------------
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      JOIN(7)(INNER)
+        => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+        => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+         SCAN(0) on default.region
+           => filter: default.region.r_regionkey (INT4) > 0
+           => target list: default.region.r_regionkey (INT4)
+           => out schema: {(1) default.region.r_regionkey (INT4)}
+           => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+         SCAN(1) on default.nation
+           => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+           => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+           => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000005)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000005
+   |-eb_0000000000000_0000_000004
+      |-eb_0000000000000_0000_000003
+         |-eb_0000000000000_0000_000002
+         |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000005
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+  => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => filter: default.region.r_regionkey (INT4) > 0
+  => target list: default.region.r_regionkey (INT4)
+  => out schema: {(1) default.region.r_regionkey (INT4)}
+  => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(11)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   JOIN(7)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as plus1
+     => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(1) default.region.r_regionkey (INT4)}
+      SCAN(9) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000003
+
+PROJECTION(4)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4)
+  => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), v1 (INT4)}
+  => in  schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+   SORT(3)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(12) on eb_0000000000000_0000_000003
+        => out schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+        => in schema: {(5) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.result b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.result
new file mode 100644
index 0000000..e437085
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs1.result
@@ -0,0 +1,22 @@
+v1,n_regionkey,r_regionkey,plus1,plus2,result
+-------------------------------
+2,1,1,2,2,1
+3,1,1,2,2,1
+4,1,1,2,2,1
+8,4,4,8,8,4
+9,3,3,6,6,3
+10,2,2,4,4,2
+10,3,3,6,6,3
+11,2,2,4,4,2
+14,2,2,4,4,2
+14,4,4,8,8,4
+15,4,4,8,8,4
+17,4,4,8,8,4
+18,1,1,2,2,1
+20,2,2,4,4,2
+22,3,3,6,6,3
+23,2,2,4,4,2
+24,4,4,8,8,4
+25,1,1,2,2,1
+25,3,3,6,6,3
+26,3,3,6,6,3

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash.plan
new file mode 100644
index 0000000..d6252ea
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash.plan
@@ -0,0 +1,119 @@
+explain
+-------------------------------
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+        => exprs: (sum(?plus (INT4)))
+        => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+        => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+         JOIN(8)(INNER)
+           => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+           => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+           => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+           => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+            SCAN(0) on default.region
+              => filter: default.region.r_regionkey (INT4) > 0
+              => target list: default.region.r_regionkey (INT4)
+              => out schema: {(1) default.region.r_regionkey (INT4)}
+              => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+            SCAN(1) on default.nation
+              => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+              => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+              => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_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 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.region
+
+GROUP_BY(12)(?plus,n_regionkey,r_regionkey,result,v1)
+  => exprs: (sum(?plus (INT4)))
+  => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)
+  => out schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+  => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+   JOIN(8)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+     => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(0) on default.region
+        => filter: default.region.r_regionkey (INT4) > 0
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(14)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+     => exprs: (sum(?sum_3 (INT8)))
+     => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+     => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+     => in schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+        => in schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(15) on eb_0000000000000_0000_000004
+        => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash_NoBroadcast.plan
new file mode 100644
index 0000000..f3a2084
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Hash_NoBroadcast.plan
@@ -0,0 +1,146 @@
+explain
+-------------------------------
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+        => exprs: (sum(?plus (INT4)))
+        => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+        => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+         JOIN(8)(INNER)
+           => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+           => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+           => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+           => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+            SCAN(0) on default.region
+              => filter: default.region.r_regionkey (INT4) > 0
+              => target list: default.region.r_regionkey (INT4)
+              => out schema: {(1) default.region.r_regionkey (INT4)}
+              => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+            SCAN(1) on default.nation
+              => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+              => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+              => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_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.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+  => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => filter: default.region.r_regionkey (INT4) > 0
+  => target list: default.region.r_regionkey (INT4)
+  => out schema: {(1) default.region.r_regionkey (INT4)}
+  => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+GROUP_BY(12)(?plus,n_regionkey,r_regionkey,result,v1)
+  => exprs: (sum(?plus (INT4)))
+  => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)
+  => out schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+  => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+   JOIN(8)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+     => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(1) default.region.r_regionkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(14)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+     => exprs: (sum(?sum_3 (INT8)))
+     => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+     => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+     => in schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+        => in schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(15) on eb_0000000000000_0000_000004
+        => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort.plan
new file mode 100644
index 0000000..d6252ea
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort.plan
@@ -0,0 +1,119 @@
+explain
+-------------------------------
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+        => exprs: (sum(?plus (INT4)))
+        => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+        => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+         JOIN(8)(INNER)
+           => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+           => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+           => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+           => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+            SCAN(0) on default.region
+              => filter: default.region.r_regionkey (INT4) > 0
+              => target list: default.region.r_regionkey (INT4)
+              => out schema: {(1) default.region.r_regionkey (INT4)}
+              => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+            SCAN(1) on default.nation
+              => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+              => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+              => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_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 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: type=Broadcast, tables=default.region
+
+GROUP_BY(12)(?plus,n_regionkey,r_regionkey,result,v1)
+  => exprs: (sum(?plus (INT4)))
+  => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)
+  => out schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+  => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+   JOIN(8)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+     => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(0) on default.region
+        => filter: default.region.r_regionkey (INT4) > 0
+        => target list: default.region.r_regionkey (INT4)
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(1) on default.nation
+        => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(14)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+     => exprs: (sum(?sum_3 (INT8)))
+     => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+     => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+     => in schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+        => in schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(15) on eb_0000000000000_0000_000004
+        => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort_NoBroadcast.plan
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort_NoBroadcast.plan b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort_NoBroadcast.plan
new file mode 100644
index 0000000..f3a2084
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.Sort_NoBroadcast.plan
@@ -0,0 +1,146 @@
+explain
+-------------------------------
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+        => exprs: (sum(?plus (INT4)))
+        => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+        => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+         JOIN(8)(INNER)
+           => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+           => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+           => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+           => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+            SCAN(0) on default.region
+              => filter: default.region.r_regionkey (INT4) > 0
+              => target list: default.region.r_regionkey (INT4)
+              => out schema: {(1) default.region.r_regionkey (INT4)}
+              => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+            SCAN(1) on default.nation
+              => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+              => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+              => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000006)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000006
+   |-eb_0000000000000_0000_000005
+      |-eb_0000000000000_0000_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.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_regionkey (INT4), default.nation.n_regionkey (INT4) + default.nation.n_nationkey (INT4) as v1
+  => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => filter: default.region.r_regionkey (INT4) > 0
+  => target list: default.region.r_regionkey (INT4)
+  => out schema: {(1) default.region.r_regionkey (INT4)}
+  => in schema: {(3) default.region.r_comment (TEXT), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+GROUP_BY(12)(?plus,n_regionkey,r_regionkey,result,v1)
+  => exprs: (sum(?plus (INT4)))
+  => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)
+  => out schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+  => in schema:{(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+   JOIN(8)(INNER)
+     => Join Cond: default.region.r_regionkey (INT4) = default.nation.n_regionkey (INT4)
+     => target list: default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) / 2 as result, default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4), default.region.r_regionkey (INT4) + default.nation.n_regionkey (INT4) as ?plus
+     => out schema: {(5) ?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4)}
+     => in schema: {(3) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), v1 (INT4)}
+      SCAN(11) on eb_0000000000000_0000_000002
+        => out schema: {(1) default.region.r_regionkey (INT4)}
+        => in schema: {(1) default.region.r_regionkey (INT4)}
+      SCAN(10) on eb_0000000000000_0000_000001
+        => out schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+        => in schema: {(2) default.nation.n_regionkey (INT4), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=?plus (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), result (INT4), v1 (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+SORT(14)
+  => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+   GROUP_BY(3)(v1,n_regionkey,r_regionkey,?plus,result)
+     => exprs: (sum(?sum_3 (INT8)))
+     => target list: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4) as plus1, result (INT4), total (INT8)
+     => out schema:{(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+     => in schema:{(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+      SCAN(13) on eb_0000000000000_0000_000003
+        => out schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+        => in schema: {(6) v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), ?plus (INT4), result (INT4), ?sum_3 (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 5 (type=RANGE_SHUFFLE, key=default.nation.n_regionkey (INT4), v1 (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000004
+
+PROJECTION(5)
+  => Targets: v1 (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus1 (INT4) as plus2, result (INT4), total (INT8)
+  => out schema: {(7) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), plus2 (INT4), result (INT4), total (INT8), v1 (INT4)}
+  => in  schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+   SORT(4)
+     => Sort Keys: v1 (INT4) (asc),default.nation.n_regionkey (INT4) (asc)
+      SCAN(15) on eb_0000000000000_0000_000004
+        => out schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+        => in schema: {(6) default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4), plus1 (INT4), result (INT4), total (INT8), v1 (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/a4106883/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.result b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.result
new file mode 100644
index 0000000..3a3ff3e
--- /dev/null
+++ b/tajo-core-tests/src/test/resources/results/TestInnerJoinQuery/testJoinCoReferredEvalsWithSameExprs2.result
@@ -0,0 +1,22 @@
+v1,n_regionkey,r_regionkey,plus1,plus2,result,total
+-------------------------------
+2,1,1,2,2,1,2
+3,1,1,2,2,1,2
+4,1,1,2,2,1,2
+8,4,4,8,8,4,8
+9,3,3,6,6,3,6
+10,2,2,4,4,2,4
+10,3,3,6,6,3,6
+11,2,2,4,4,2,4
+14,2,2,4,4,2,4
+14,4,4,8,8,4,8
+15,4,4,8,8,4,8
+17,4,4,8,8,4,8
+18,1,1,2,2,1,2
+20,2,2,4,4,2,4
+22,3,3,6,6,3,6
+23,2,2,4,4,2,4
+24,4,4,8,8,4,8
+25,1,1,2,2,1,2
+25,3,3,6,6,3,6
+26,3,3,6,6,3,6


Mime
View raw message