tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [06/24] tajo git commit: TAJO-1553: Improve broadcast join planning. (jihoon)
Date Sat, 30 May 2015 04:05:08 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Sort.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Sort.plan b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Sort.plan
index c4c25da..45b95c2 100644
--- a/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Sort.plan
+++ b/tajo-core/src/test/resources/results/TestOuterJoinWithSubQuery/testLeftOuterJoinWithEmptySubquery2.1.Sort.plan
@@ -34,82 +34,52 @@ 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
+1: eb_0000000000000_0000_000005
+2: eb_0000000000000_0000_000006
 -------------------------------------------------------------------------------
 
 =======================================================
-Block Id: eb_0000000000000_0000_000003 [LEAF]
-=======================================================
-
-[Outgoing]
-[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
-
-[Enforcers]
- 0: type=Broadcast, tables=default.lineitem
- 1: type=Broadcast, tables=default.jointable12
-
-TABLE_SUBQUERY(4) as default.a
-  => Targets: default.a.id (INT4)
-  => out schema: {(1) default.a.id (INT4)}
-  => in  schema: {(3) default.a.id (INT4), default.a.name (TEXT), default.a.l_shipdate (TEXT)}
-   PROJECTION(3)
-     => Targets: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
-     => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
-     => in  schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
-      JOIN(9)(INNER)
-        => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
-        => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
-        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
-        => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
-         SCAN(0) on default.jointable12
-           => filter: default.jointable12.id (INT4) > 10
-           => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
-           => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
-           => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
-         SCAN(1) on default.lineitem
-           => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
-           => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
-           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
-
-=======================================================
-Block Id: eb_0000000000000_0000_000004 [LEAF]
-=======================================================
-
-[Outgoing]
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
-
-SCAN(5) on default.jointable11 as b
-  => target list: default.b.id (INT4)
-  => out schema: {(1) default.b.id (INT4)}
-  => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
-
-=======================================================
 Block Id: eb_0000000000000_0000_000005 [ROOT]
 =======================================================
 
-[Incoming]
-[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.a.id (INT4), num=32)
-[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.b.id (INT4), num=32)
+[Enforcers]
+ 0: type=Broadcast, tables=default.jointable12
+ 1: type=Broadcast, tables=default.b
 
 JOIN(10)(LEFT_OUTER)
   => Join Cond: default.a.id (INT4) = default.b.id (INT4)
   => target list: default.a.id (INT4), default.b.id (INT4)
   => out schema: {(2) default.a.id (INT4), default.b.id (INT4)}
   => in schema: {(2) default.a.id (INT4), default.b.id (INT4)}
-   SCAN(13) on eb_0000000000000_0000_000004
+   SCAN(5) on default.jointable11 as b
+     => target list: default.b.id (INT4)
      => out schema: {(1) default.b.id (INT4)}
-     => in schema: {(1) default.b.id (INT4)}
-   SCAN(12) on eb_0000000000000_0000_000003
+     => in schema: {(2) default.b.id (INT4), default.b.name (TEXT)}
+   TABLE_SUBQUERY(4) as default.a
+     => Targets: default.a.id (INT4)
      => out schema: {(1) default.a.id (INT4)}
-     => in schema: {(1) default.a.id (INT4)}
+     => in  schema: {(3) default.a.id (INT4), default.a.name (TEXT), default.a.l_shipdate (TEXT)}
+      PROJECTION(3)
+        => Targets: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+        => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+        => in  schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+         JOIN(9)(INNER)
+           => Join Cond: default.jointable12.id (INT4) = default.lineitem.l_orderkey (INT4)
+           => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)
+           => out schema: {(3) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_shipdate (TEXT)}
+           => in schema: {(4) default.jointable12.id (INT4), default.jointable12.name (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+            SCAN(0) on default.jointable12
+              => filter: default.jointable12.id (INT4) > 10
+              => target list: default.jointable12.id (INT4), default.jointable12.name (TEXT)
+              => out schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+              => in schema: {(2) default.jointable12.id (INT4), default.jointable12.name (TEXT)}
+            SCAN(1) on default.lineitem
+              => target list: default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)
+              => out schema: {(2) default.lineitem.l_orderkey (INT4), default.lineitem.l_shipdate (TEXT)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
 
 =======================================================
 Block Id: eb_0000000000000_0000_000006 [TERMINAL]

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.plan b/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.plan
new file mode 100644
index 0000000..17a7658
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.plan
@@ -0,0 +1,112 @@
+explain
+-------------------------------
+SORT(6)
+  => Sort Keys: default.l2.l_orderkey (INT4) (asc)
+   TABLE_SUBQUERY(5) as default.l2
+     => Targets: default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)
+     => out schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+     => in  schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+      TABLE_SUBQUERY(3) as default.l1
+        => Targets: default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)
+        => out schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+        => in  schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+         GROUP_BY(1)(l_orderkey)
+           => exprs: (sum(?multiply (FLOAT8)))
+           => target list: default.lineitem.l_orderkey (INT4), revenue (FLOAT8)
+           => out schema:{(2) default.lineitem.l_orderkey (INT4), revenue (FLOAT8)}
+           => in schema:{(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4)}
+            SCAN(0) on default.lineitem
+              => target list: default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * default.lineitem.l_discount (FLOAT8) as ?multiply
+              => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4)}
+              => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000004)
+-------------------------------------------------------------------------------
+|-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
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+GROUP_BY(10)(l_orderkey)
+  => exprs: (sum(?multiply (FLOAT8)))
+  => target list: default.lineitem.l_orderkey (INT4), ?sum_1 (FLOAT8)
+  => out schema:{(2) default.lineitem.l_orderkey (INT4), ?sum_1 (FLOAT8)}
+  => in schema:{(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4)}
+   SCAN(0) on default.lineitem
+     => target list: default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * default.lineitem.l_discount (FLOAT8) as ?multiply
+     => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4)}
+     => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=RANGE_SHUFFLE, key=default.l2.l_orderkey (INT4), num=32)
+
+SORT(12)
+  => Sort Keys: default.l2.l_orderkey (INT4) (asc)
+   TABLE_SUBQUERY(5) as default.l2
+     => Targets: default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)
+     => out schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+     => in  schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+      PROJECTION(4)
+        => Targets: default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)
+        => out schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+        => in  schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+         TABLE_SUBQUERY(3) as default.l1
+           => Targets: default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)
+           => out schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+           => in  schema: {(2) default.l1.l_orderkey (INT4), default.l1.revenue (FLOAT8)}
+            PROJECTION(2)
+              => Targets: default.lineitem.l_orderkey (INT4), revenue (FLOAT8)
+              => out schema: {(2) default.lineitem.l_orderkey (INT4), revenue (FLOAT8)}
+              => in  schema: {(2) default.lineitem.l_orderkey (INT4), revenue (FLOAT8)}
+               GROUP_BY(1)(l_orderkey)
+                 => exprs: (sum(?sum_1 (FLOAT8)))
+                 => target list: default.lineitem.l_orderkey (INT4), revenue (FLOAT8)
+                 => out schema:{(2) default.lineitem.l_orderkey (INT4), revenue (FLOAT8)}
+                 => in schema:{(2) default.lineitem.l_orderkey (INT4), ?sum_1 (FLOAT8)}
+                  SCAN(11) on eb_0000000000000_0000_000001
+                    => out schema: {(2) default.lineitem.l_orderkey (INT4), ?sum_1 (FLOAT8)}
+                    => in schema: {(2) default.lineitem.l_orderkey (INT4), ?sum_1 (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 3 (type=RANGE_SHUFFLE, key=default.l2.l_orderkey (INT4), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000002
+
+SORT(6)
+  => Sort Keys: default.l2.l_orderkey (INT4) (asc)
+   SCAN(13) on eb_0000000000000_0000_000002
+     => out schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+     => in schema: {(2) default.l2.l_orderkey (INT4), default.l2.revenue (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.result b/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.result
new file mode 100644
index 0000000..2b63526
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestSortQuery/testSubQuerySortAfterGroupMultiBlocks.result
@@ -0,0 +1,5 @@
+l_orderkey,revenue
+-------------------------------
+1,4985.2136
+2,0.0
+3,7923.13

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.plan b/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.plan
new file mode 100644
index 0000000..4cf1bac
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.plan
@@ -0,0 +1,88 @@
+explain
+-------------------------------
+SORT(2)
+  => Sort Keys: default.lineitem.l_returnflag (TEXT) (asc),default.lineitem.l_linestatus (TEXT) (asc)
+   GROUP_BY(1)(l_returnflag,l_linestatus)
+     => exprs: (count())
+     => target list: default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), count_order (INT8)
+     => out schema:{(3) count_order (INT8), default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+     => in schema:{(2) default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+      SCAN(0) on default.lineitem
+        => target list: default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)
+        => out schema: {(2) default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+        => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000004)
+-------------------------------------------------------------------------------
+|-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
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT), num=32)
+
+GROUP_BY(6)(l_linestatus,l_returnflag)
+  => exprs: (count())
+  => target list: default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), ?count (INT8)
+  => out schema:{(3) default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), ?count (INT8)}
+  => in schema:{(2) default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+   SCAN(0) on default.lineitem
+     => target list: default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)
+     => out schema: {(2) default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+     => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 2 (type=HASH_SHUFFLE, key=default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=RANGE_SHUFFLE, key=default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT), num=32)
+
+SORT(8)
+  => Sort Keys: default.lineitem.l_returnflag (TEXT) (asc),default.lineitem.l_linestatus (TEXT) (asc)
+   GROUP_BY(1)(l_returnflag,l_linestatus)
+     => exprs: (count(?count (INT8)))
+     => target list: default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), count_order (INT8)
+     => out schema:{(3) count_order (INT8), default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+     => in schema:{(3) default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), ?count (INT8)}
+      SCAN(7) on eb_0000000000000_0000_000001
+        => out schema: {(3) default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), ?count (INT8)}
+        => in schema: {(3) default.lineitem.l_returnflag (TEXT), default.lineitem.l_linestatus (TEXT), ?count (INT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 2 => 3 (type=RANGE_SHUFFLE, key=default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000002
+
+SORT(2)
+  => Sort Keys: default.lineitem.l_returnflag (TEXT) (asc),default.lineitem.l_linestatus (TEXT) (asc)
+   SCAN(9) on eb_0000000000000_0000_000002
+     => out schema: {(3) count_order (INT8), default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+     => in schema: {(3) count_order (INT8), default.lineitem.l_linestatus (TEXT), default.lineitem.l_returnflag (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.result b/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.result
index 94b5e84..a34b514 100644
--- a/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.result
+++ b/tajo-core/src/test/resources/results/TestTPCH/testQ1OrderBy.result
@@ -1,4 +1,4 @@
 l_returnflag,l_linestatus,count_order
 -------------------------------
 N,O,3
-R,F,2
\ No newline at end of file
+R,F,2

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.plan b/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.plan
new file mode 100644
index 0000000..a2beae2
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.plan
@@ -0,0 +1,228 @@
+explain
+-------------------------------
+JOIN(14)(INNER)
+  => Join Cond: default.supplier.s_nationkey (INT4) = default.nation.n_nationkey (INT4)
+  => target list: default.nation.n_name (TEXT), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_phone (TEXT)
+  => out schema: {(12) default.nation.n_name (TEXT), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_phone (TEXT)}
+  => in schema: {(14) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+   JOIN(13)(INNER)
+     => Join Cond: default.nation.n_regionkey (INT4) = default.region.r_regionkey (INT4)
+     => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)
+     => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)}
+     => in schema: {(5) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+      SCAN(0) on default.region
+        => filter: default.region.r_name (TEXT) = AMERICA
+        => target list: default.region.r_name (TEXT), default.region.r_regionkey (INT4)
+        => out schema: {(2) default.region.r_name (TEXT), 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_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+        => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+        => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+   JOIN(12)(INNER)
+     => Join Cond: default.part.p_partkey (INT4) = default.partsupp.ps_partkey (INT4)
+     => target list: default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)
+     => out schema: {(11) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+     => in schema: {(12) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+      SCAN(7) on default.part
+        => filter: default.part.p_size (INT4) = 15 AND default.part.p_type (TEXT)LIKE'%BRASS'
+        => target list: default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)
+        => out schema: {(4) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)}
+        => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+      JOIN(11)(INNER)
+        => Join Cond: default.supplier.s_suppkey (INT4) = default.partsupp.ps_suppkey (INT4)
+        => target list: default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)
+        => out schema: {(8) default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+        => in schema: {(10) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+         SCAN(5) on default.partsupp
+           => target list: default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)
+           => out schema: {(3) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+           => in schema: {(5) default.partsupp.ps_availqty (INT4), default.partsupp.ps_comment (TEXT), default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+         SCAN(3) on default.supplier
+           => target list: default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)
+           => out schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+           => in schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000010)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000010
+   |-eb_0000000000000_0000_000009
+      |-eb_0000000000000_0000_000008
+         |-eb_0000000000000_0000_000007
+         |-eb_0000000000000_0000_000006
+      |-eb_0000000000000_0000_000005
+         |-eb_0000000000000_0000_000004
+         |-eb_0000000000000_0000_000003
+            |-eb_0000000000000_0000_000002
+            |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000003
+4: eb_0000000000000_0000_000004
+5: eb_0000000000000_0000_000006
+6: eb_0000000000000_0000_000007
+7: eb_0000000000000_0000_000005
+8: eb_0000000000000_0000_000008
+9: eb_0000000000000_0000_000009
+10: eb_0000000000000_0000_000010
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.supplier.s_suppkey (INT4), num=32)
+
+SCAN(3) on default.supplier
+  => target list: default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)
+  => out schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+  => in schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.partsupp.ps_suppkey (INT4), num=32)
+
+SCAN(5) on default.partsupp
+  => target list: default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)
+  => out schema: {(3) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+  => in schema: {(5) default.partsupp.ps_availqty (INT4), default.partsupp.ps_comment (TEXT), default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.supplier.s_suppkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.partsupp.ps_suppkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.partsupp.ps_partkey (INT4), num=32)
+
+JOIN(11)(INNER)
+  => Join Cond: default.supplier.s_suppkey (INT4) = default.partsupp.ps_suppkey (INT4)
+  => target list: default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)
+  => out schema: {(8) default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+  => in schema: {(10) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+   SCAN(17) on eb_0000000000000_0000_000002
+     => out schema: {(3) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+     => in schema: {(3) default.partsupp.ps_partkey (INT4), default.partsupp.ps_suppkey (INT4), default.partsupp.ps_supplycost (FLOAT8)}
+   SCAN(16) on eb_0000000000000_0000_000001
+     => out schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+     => in schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(7) on default.part
+  => filter: default.part.p_size (INT4) = 15 AND default.part.p_type (TEXT)LIKE'%BRASS'
+  => target list: default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)
+  => out schema: {(4) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 5 (type=HASH_SHUFFLE, key=default.partsupp.ps_partkey (INT4), num=32)
+[q_0000000000000_0000] 4 => 5 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 9 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+
+JOIN(12)(INNER)
+  => Join Cond: default.part.p_partkey (INT4) = default.partsupp.ps_partkey (INT4)
+  => target list: default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)
+  => out schema: {(11) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+  => in schema: {(12) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+   SCAN(19) on eb_0000000000000_0000_000004
+     => out schema: {(4) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)}
+     => in schema: {(4) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT)}
+   SCAN(18) on eb_0000000000000_0000_000003
+     => out schema: {(8) default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+     => in schema: {(8) default.partsupp.ps_partkey (INT4), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000006 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+
+SCAN(1) on default.nation
+  => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+  => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(0) on default.region
+  => filter: default.region.r_name (TEXT) = AMERICA
+  => target list: default.region.r_name (TEXT), default.region.r_regionkey (INT4)
+  => out schema: {(2) default.region.r_name (TEXT), 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_000008 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 6 => 8 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 7 => 8 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.nation.n_nationkey (INT4), num=32)
+
+JOIN(13)(INNER)
+  => Join Cond: default.nation.n_regionkey (INT4) = default.region.r_regionkey (INT4)
+  => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)
+  => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)}
+  => in schema: {(5) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4), default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+   SCAN(21) on eb_0000000000000_0000_000007
+     => out schema: {(2) default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+     => in schema: {(2) default.region.r_name (TEXT), default.region.r_regionkey (INT4)}
+   SCAN(20) on eb_0000000000000_0000_000006
+     => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000009 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 5 => 9 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 8 => 9 (type=HASH_SHUFFLE, key=default.nation.n_nationkey (INT4), num=32)
+
+JOIN(14)(INNER)
+  => Join Cond: default.supplier.s_nationkey (INT4) = default.nation.n_nationkey (INT4)
+  => target list: default.nation.n_name (TEXT), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_phone (TEXT)
+  => out schema: {(12) default.nation.n_name (TEXT), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_phone (TEXT)}
+  => in schema: {(14) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.region.r_name (TEXT), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+   SCAN(23) on eb_0000000000000_0000_000008
+     => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)}
+     => in schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.region.r_name (TEXT)}
+   SCAN(22) on eb_0000000000000_0000_000005
+     => out schema: {(11) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+     => in schema: {(11) default.part.p_mfgr (TEXT), default.part.p_partkey (INT4), default.part.p_size (INT4), default.part.p_type (TEXT), default.partsupp.ps_supplycost (FLOAT8), default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000010 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.result b/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.result
index 7c81978..64d8e12 100644
--- a/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.result
+++ b/tajo-core/src/test/resources/results/TestTPCH/testQ2FourJoins.result
@@ -1,3 +1,3 @@
 s_acctbal,s_name,n_name,p_partkey,p_mfgr,s_address,s_phone,s_comment,ps_supplycost,r_name,p_type,p_size
 -------------------------------
-4192.4,Supplier#000000003,ARGENTINA,2,Manufacturer#1,q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3,11-383-516-1199,blithely silent requests after the express dependencies are sl,1.01,AMERICA,LARGE BRUSHED BRASS,15
\ No newline at end of file
+4192.4,Supplier#000000003,ARGENTINA,2,Manufacturer#1,q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3,11-383-516-1199,blithely silent requests after the express dependencies are sl,1.01,AMERICA,LARGE BRUSHED BRASS,15

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.plan b/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.plan
new file mode 100644
index 0000000..8a716eb
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.plan
@@ -0,0 +1,119 @@
+explain
+-------------------------------
+PROJECTION(3)
+  => Targets: 100.0 * ?sum_1 (FLOAT8) / ?sum_3 (FLOAT8) as promo_revenue
+  => out schema: {(1) promo_revenue (FLOAT8)}
+  => in  schema: {(2) ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)}
+   GROUP_BY(5)()
+     => exprs: (sum(?casewhen (FLOAT8)),sum(?multiply_2 (FLOAT8)))
+     => target list: ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)
+     => out schema:{(2) ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)}
+     => in schema:{(2) ?casewhen (FLOAT8), ?multiply_2 (FLOAT8)}
+      JOIN(7)(INNER)
+        => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+        => target list: CASE WHEN default.part.p_type (TEXT)LIKE'PROMO%' THEN default.lineitem.l_extendedprice (FLOAT8) ELSE 0.0 END as ?casewhen, ?multiply_2 (FLOAT8)
+        => out schema: {(2) ?casewhen (FLOAT8), ?multiply_2 (FLOAT8)}
+        => in schema: {(5) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4), default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+         SCAN(1) on default.part
+           => target list: default.part.p_partkey (INT4), default.part.p_type (TEXT)
+           => out schema: {(2) default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+           => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+         SCAN(0) on default.lineitem
+           => target list: default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * 1.0 - default.lineitem.l_discount (FLOAT8) as ?multiply_2
+           => out schema: {(3) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4)}
+           => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+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.lineitem.l_partkey (INT4), num=32)
+
+SCAN(0) on default.lineitem
+  => target list: default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * 1.0 - default.lineitem.l_discount (FLOAT8) as ?multiply_2
+  => out schema: {(3) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+SCAN(1) on default.part
+  => target list: default.part.p_partkey (INT4), default.part.p_type (TEXT)
+  => out schema: {(2) default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+  => in schema: {(9) default.part.p_brand (TEXT), default.part.p_comment (TEXT), default.part.p_container (TEXT), default.part.p_mfgr (TEXT), default.part.p_name (TEXT), default.part.p_partkey (INT4), default.part.p_retailprice (FLOAT8), default.part.p_size (INT4), default.part.p_type (TEXT)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000003 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_partkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.part.p_partkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=, num=1)
+
+GROUP_BY(11)()
+  => exprs: (sum(?casewhen (FLOAT8)),sum(?multiply_2 (FLOAT8)))
+  => target list: ?sum_6 (FLOAT8), ?sum_7 (FLOAT8)
+  => out schema:{(2) ?sum_6 (FLOAT8), ?sum_7 (FLOAT8)}
+  => in schema:{(2) ?casewhen (FLOAT8), ?multiply_2 (FLOAT8)}
+   JOIN(7)(INNER)
+     => Join Cond: default.lineitem.l_partkey (INT4) = default.part.p_partkey (INT4)
+     => target list: CASE WHEN default.part.p_type (TEXT)LIKE'PROMO%' THEN default.lineitem.l_extendedprice (FLOAT8) ELSE 0.0 END as ?casewhen, ?multiply_2 (FLOAT8)
+     => out schema: {(2) ?casewhen (FLOAT8), ?multiply_2 (FLOAT8)}
+     => in schema: {(5) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4), default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+      SCAN(10) on eb_0000000000000_0000_000002
+        => out schema: {(2) default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+        => in schema: {(2) default.part.p_partkey (INT4), default.part.p_type (TEXT)}
+      SCAN(9) on eb_0000000000000_0000_000001
+        => out schema: {(3) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4)}
+        => in schema: {(3) ?multiply_2 (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_partkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 4 (type=HASH_SHUFFLE, key=, num=1)
+
+PROJECTION(3)
+  => Targets: 100.0 * ?sum_1 (FLOAT8) / ?sum_3 (FLOAT8) as promo_revenue
+  => out schema: {(1) promo_revenue (FLOAT8)}
+  => in  schema: {(2) ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)}
+   GROUP_BY(5)()
+     => exprs: (sum(?sum_6 (FLOAT8)),sum(?sum_7 (FLOAT8)))
+     => target list: ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)
+     => out schema:{(2) ?sum_1 (FLOAT8), ?sum_3 (FLOAT8)}
+     => in schema:{(2) ?sum_6 (FLOAT8), ?sum_7 (FLOAT8)}
+      SCAN(12) on eb_0000000000000_0000_000003
+        => out schema: {(2) ?sum_6 (FLOAT8), ?sum_7 (FLOAT8)}
+        => in schema: {(2) ?sum_6 (FLOAT8), ?sum_7 (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.result b/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.result
index 6bc69cc..ace2a07 100644
--- a/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.result
+++ b/tajo-core/src/test/resources/results/TestTPCH/testTPCH14Expr.result
@@ -1,3 +1,3 @@
 promo_revenue
 -------------------------------
-33.610645634855025
\ No newline at end of file
+33.610645634855025

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.plan
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.plan b/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.plan
new file mode 100644
index 0000000..95abaf1
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.plan
@@ -0,0 +1,332 @@
+explain
+-------------------------------
+SORT(8)
+  => Sort Keys: revenue (FLOAT8) (desc)
+   GROUP_BY(7)(n_name)
+     => exprs: (sum(?multiply (FLOAT8)))
+     => target list: default.nation.n_name (TEXT), revenue (FLOAT8)
+     => out schema:{(2) default.nation.n_name (TEXT), revenue (FLOAT8)}
+     => in schema:{(2) ?multiply (FLOAT8), default.nation.n_name (TEXT)}
+      JOIN(20)(INNER)
+        => Join Cond: default.supplier.s_nationkey (INT4) = default.nation.n_nationkey (INT4)
+        => target list: ?multiply (FLOAT8), default.nation.n_name (TEXT)
+        => out schema: {(2) ?multiply (FLOAT8), default.nation.n_name (TEXT)}
+        => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.supplier.s_nationkey (INT4)}
+         JOIN(19)(INNER)
+           => Join Cond: default.nation.n_regionkey (INT4) = default.region.r_regionkey (INT4)
+           => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)
+           => out schema: {(2) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)}
+           => in schema: {(4) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+            SCAN(5) on default.region
+              => filter: default.region.r_name (TEXT) = ASIA
+              => 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(4) on default.nation
+              => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+              => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+              => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+         JOIN(18)(INNER)
+           => Join Cond: default.lineitem.l_suppkey (INT4) = default.supplier.s_suppkey (INT4)
+           => target list: ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)
+           => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)}
+           => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4), default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+            JOIN(17)(INNER)
+              => Join Cond: default.customer.c_nationkey (INT4) = default.supplier.s_nationkey (INT4)
+              => target list: default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)
+              => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+              => in schema: {(3) default.customer.c_nationkey (INT4), default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+               SCAN(0) on default.customer
+                 => target list: default.customer.c_nationkey (INT4)
+                 => out schema: {(1) default.customer.c_nationkey (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)}
+               SCAN(3) on default.supplier
+                 => target list: default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)
+                 => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+                 => in schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+            JOIN(16)(INNER)
+              => Join Cond: default.lineitem.l_orderkey (INT4) = default.orders.o_orderkey (INT4)
+              => target list: ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)
+              => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)}
+              => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4), default.orders.o_orderkey (INT4)}
+               SCAN(1) on default.orders
+                 => filter: default.orders.o_orderdate (TEXT) >= 1994-01-01 AND default.orders.o_orderdate (TEXT) < 1995-01-01
+                 => target list: default.orders.o_orderkey (INT4)
+                 => out schema: {(1) default.orders.o_orderkey (INT4)}
+                 => 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(2) on default.lineitem
+                 => target list: default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * 1.0 - default.lineitem.l_discount (FLOAT8) as ?multiply
+                 => out schema: {(5) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4)}
+                 => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+explain
+-------------------------------
+-------------------------------------------------------------------------------
+Execution Block Graph (TERMINAL - eb_0000000000000_0000_000014)
+-------------------------------------------------------------------------------
+|-eb_0000000000000_0000_000014
+   |-eb_0000000000000_0000_000013
+      |-eb_0000000000000_0000_000012
+         |-eb_0000000000000_0000_000011
+            |-eb_0000000000000_0000_000010
+               |-eb_0000000000000_0000_000009
+               |-eb_0000000000000_0000_000008
+            |-eb_0000000000000_0000_000007
+               |-eb_0000000000000_0000_000006
+                  |-eb_0000000000000_0000_000005
+                  |-eb_0000000000000_0000_000004
+               |-eb_0000000000000_0000_000003
+                  |-eb_0000000000000_0000_000002
+                  |-eb_0000000000000_0000_000001
+-------------------------------------------------------------------------------
+Order of Execution
+-------------------------------------------------------------------------------
+1: eb_0000000000000_0000_000001
+2: eb_0000000000000_0000_000002
+3: eb_0000000000000_0000_000004
+4: eb_0000000000000_0000_000005
+5: eb_0000000000000_0000_000003
+6: eb_0000000000000_0000_000006
+7: eb_0000000000000_0000_000008
+8: eb_0000000000000_0000_000009
+9: eb_0000000000000_0000_000007
+10: eb_0000000000000_0000_000010
+11: eb_0000000000000_0000_000011
+12: eb_0000000000000_0000_000012
+13: eb_0000000000000_0000_000013
+14: eb_0000000000000_0000_000014
+-------------------------------------------------------------------------------
+
+=======================================================
+Block Id: eb_0000000000000_0000_000001 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 1 => 3 (type=HASH_SHUFFLE, key=default.lineitem.l_orderkey (INT4), num=32)
+
+SCAN(2) on default.lineitem
+  => target list: default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4), default.lineitem.l_extendedprice (FLOAT8) * 1.0 - default.lineitem.l_discount (FLOAT8) as ?multiply
+  => out schema: {(5) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4)}
+  => in schema: {(16) default.lineitem.l_comment (TEXT), default.lineitem.l_commitdate (TEXT), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_linenumber (INT4), default.lineitem.l_linestatus (TEXT), default.lineitem.l_orderkey (INT4), default.lineitem.l_partkey (INT4), default.lineitem.l_quantity (FLOAT8), default.lineitem.l_receiptdate (TEXT), default.lineitem.l_returnflag (TEXT), default.lineitem.l_shipdate (TEXT), default.lineitem.l_shipinstruct (TEXT), default.lineitem.l_shipmode (TEXT), default.lineitem.l_suppkey (INT4), default.lineitem.l_tax (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000002 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.orders.o_orderkey (INT4), num=32)
+
+SCAN(1) on default.orders
+  => filter: default.orders.o_orderdate (TEXT) >= 1994-01-01 AND default.orders.o_orderdate (TEXT) < 1995-01-01
+  => target list: default.orders.o_orderkey (INT4)
+  => out schema: {(1) default.orders.o_orderkey (INT4)}
+  => 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.lineitem.l_orderkey (INT4), num=32)
+[q_0000000000000_0000] 2 => 3 (type=HASH_SHUFFLE, key=default.orders.o_orderkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 3 => 7 (type=HASH_SHUFFLE, key=default.lineitem.l_suppkey (INT4), num=32)
+
+JOIN(16)(INNER)
+  => Join Cond: default.lineitem.l_orderkey (INT4) = default.orders.o_orderkey (INT4)
+  => target list: ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)
+  => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)}
+  => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4), default.orders.o_orderkey (INT4)}
+   SCAN(23) on eb_0000000000000_0000_000002
+     => out schema: {(1) default.orders.o_orderkey (INT4)}
+     => in schema: {(1) default.orders.o_orderkey (INT4)}
+   SCAN(22) on eb_0000000000000_0000_000001
+     => out schema: {(5) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4)}
+     => in schema: {(5) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_orderkey (INT4), default.lineitem.l_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000004 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 4 => 6 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+
+SCAN(3) on default.supplier
+  => target list: default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)
+  => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+  => in schema: {(7) default.supplier.s_acctbal (FLOAT8), default.supplier.s_address (TEXT), default.supplier.s_comment (TEXT), default.supplier.s_name (TEXT), default.supplier.s_nationkey (INT4), default.supplier.s_phone (TEXT), default.supplier.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000005 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 5 => 6 (type=HASH_SHUFFLE, key=default.customer.c_nationkey (INT4), num=32)
+
+SCAN(0) on default.customer
+  => target list: default.customer.c_nationkey (INT4)
+  => out schema: {(1) default.customer.c_nationkey (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_000006 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 4 => 6 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 5 => 6 (type=HASH_SHUFFLE, key=default.customer.c_nationkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 6 => 7 (type=HASH_SHUFFLE, key=default.supplier.s_suppkey (INT4), num=32)
+
+JOIN(17)(INNER)
+  => Join Cond: default.customer.c_nationkey (INT4) = default.supplier.s_nationkey (INT4)
+  => target list: default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)
+  => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+  => in schema: {(3) default.customer.c_nationkey (INT4), default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+   SCAN(25) on eb_0000000000000_0000_000005
+     => out schema: {(1) default.customer.c_nationkey (INT4)}
+     => in schema: {(1) default.customer.c_nationkey (INT4)}
+   SCAN(24) on eb_0000000000000_0000_000004
+     => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+     => in schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000007 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 3 => 7 (type=HASH_SHUFFLE, key=default.lineitem.l_suppkey (INT4), num=32)
+[q_0000000000000_0000] 6 => 7 (type=HASH_SHUFFLE, key=default.supplier.s_suppkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 7 => 11 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+
+JOIN(18)(INNER)
+  => Join Cond: default.lineitem.l_suppkey (INT4) = default.supplier.s_suppkey (INT4)
+  => target list: ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)
+  => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)}
+  => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4), default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+   SCAN(27) on eb_0000000000000_0000_000006
+     => out schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+     => in schema: {(2) default.supplier.s_nationkey (INT4), default.supplier.s_suppkey (INT4)}
+   SCAN(26) on eb_0000000000000_0000_000003
+     => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)}
+     => in schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.lineitem.l_suppkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000008 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+
+SCAN(4) on default.nation
+  => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)
+  => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+  => in schema: {(4) default.nation.n_comment (TEXT), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000009 [LEAF]
+=======================================================
+
+[Outgoing]
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+SCAN(5) on default.region
+  => filter: default.region.r_name (TEXT) = ASIA
+  => 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_000010 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 8 => 10 (type=HASH_SHUFFLE, key=default.nation.n_regionkey (INT4), num=32)
+[q_0000000000000_0000] 9 => 10 (type=HASH_SHUFFLE, key=default.region.r_regionkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=default.nation.n_nationkey (INT4), num=32)
+
+JOIN(19)(INNER)
+  => Join Cond: default.nation.n_regionkey (INT4) = default.region.r_regionkey (INT4)
+  => target list: default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)
+  => out schema: {(2) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)}
+  => in schema: {(4) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4), default.region.r_regionkey (INT4)}
+   SCAN(29) on eb_0000000000000_0000_000009
+     => out schema: {(1) default.region.r_regionkey (INT4)}
+     => in schema: {(1) default.region.r_regionkey (INT4)}
+   SCAN(28) on eb_0000000000000_0000_000008
+     => out schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+     => in schema: {(3) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.nation.n_regionkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000011 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 7 => 11 (type=HASH_SHUFFLE, key=default.supplier.s_nationkey (INT4), num=32)
+[q_0000000000000_0000] 10 => 11 (type=HASH_SHUFFLE, key=default.nation.n_nationkey (INT4), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 11 => 12 (type=HASH_SHUFFLE, key=default.nation.n_name (TEXT), num=32)
+
+GROUP_BY(32)(n_name)
+  => exprs: (sum(?multiply (FLOAT8)))
+  => target list: default.nation.n_name (TEXT), ?sum_7 (FLOAT8)
+  => out schema:{(2) default.nation.n_name (TEXT), ?sum_7 (FLOAT8)}
+  => in schema:{(2) ?multiply (FLOAT8), default.nation.n_name (TEXT)}
+   JOIN(20)(INNER)
+     => Join Cond: default.supplier.s_nationkey (INT4) = default.nation.n_nationkey (INT4)
+     => target list: ?multiply (FLOAT8), default.nation.n_name (TEXT)
+     => out schema: {(2) ?multiply (FLOAT8), default.nation.n_name (TEXT)}
+     => in schema: {(6) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.nation.n_name (TEXT), default.nation.n_nationkey (INT4), default.supplier.s_nationkey (INT4)}
+      SCAN(31) on eb_0000000000000_0000_000010
+        => out schema: {(2) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)}
+        => in schema: {(2) default.nation.n_name (TEXT), default.nation.n_nationkey (INT4)}
+      SCAN(30) on eb_0000000000000_0000_000007
+        => out schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)}
+        => in schema: {(4) ?multiply (FLOAT8), default.lineitem.l_discount (FLOAT8), default.lineitem.l_extendedprice (FLOAT8), default.supplier.s_nationkey (INT4)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000012 [INTERMEDIATE]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 11 => 12 (type=HASH_SHUFFLE, key=default.nation.n_name (TEXT), num=32)
+
+[Outgoing]
+[q_0000000000000_0000] 12 => 13 (type=RANGE_SHUFFLE, key=revenue (FLOAT8), num=32)
+
+SORT(34)
+  => Sort Keys: revenue (FLOAT8) (desc)
+   GROUP_BY(7)(n_name)
+     => exprs: (sum(?sum_7 (FLOAT8)))
+     => target list: default.nation.n_name (TEXT), revenue (FLOAT8)
+     => out schema:{(2) default.nation.n_name (TEXT), revenue (FLOAT8)}
+     => in schema:{(2) default.nation.n_name (TEXT), ?sum_7 (FLOAT8)}
+      SCAN(33) on eb_0000000000000_0000_000011
+        => out schema: {(2) default.nation.n_name (TEXT), ?sum_7 (FLOAT8)}
+        => in schema: {(2) default.nation.n_name (TEXT), ?sum_7 (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000013 [ROOT]
+=======================================================
+
+[Incoming]
+[q_0000000000000_0000] 12 => 13 (type=RANGE_SHUFFLE, key=revenue (FLOAT8), num=32)
+
+[Enforcers]
+ 0: sorted input=eb_0000000000000_0000_000012
+
+SORT(8)
+  => Sort Keys: revenue (FLOAT8) (desc)
+   SCAN(35) on eb_0000000000000_0000_000012
+     => out schema: {(2) default.nation.n_name (TEXT), revenue (FLOAT8)}
+     => in schema: {(2) default.nation.n_name (TEXT), revenue (FLOAT8)}
+
+=======================================================
+Block Id: eb_0000000000000_0000_000014 [TERMINAL]
+=======================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/8fd9ae72/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.result
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.result b/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.result
new file mode 100644
index 0000000..f15c366
--- /dev/null
+++ b/tajo-core/src/test/resources/results/TestTPCH/testTPCHQ5.result
@@ -0,0 +1,2 @@
+n_name,revenue
+-------------------------------


Mime
View raw message