tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [1/2] TAJO-194: LogicalNode should have an identifier to distinguish each logical node instance. (hyunsik)
Date Mon, 23 Sep 2013 12:15:44 GMT
Updated Branches:
  refs/heads/master 44bb57dc4 -> fc018de82


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/fc018de8/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
index 1789f26..141fbb7 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
@@ -31,10 +31,7 @@ import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.datum.Datum;
 import org.apache.tajo.datum.DatumFactory;
 import org.apache.tajo.engine.parser.SQLAnalyzer;
-import org.apache.tajo.engine.planner.LogicalPlanner;
-import org.apache.tajo.engine.planner.PhysicalPlanner;
-import org.apache.tajo.engine.planner.PhysicalPlannerImpl;
-import org.apache.tajo.engine.planner.PlanningException;
+import org.apache.tajo.engine.planner.*;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.SortNode;
 import org.apache.tajo.storage.*;
@@ -159,10 +156,11 @@ public class TestMergeJoinExec {
     TaskAttemptContext ctx = new TaskAttemptContext(conf,
         LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
     Expr expr = analyzer.parse(QUERIES[0]);
-    LogicalNode plan = planner.createPlan(expr).getRootBlock().getRoot();
+    LogicalPlan plan = planner.createPlan(expr);
+    LogicalNode root = plan.getRootBlock().getRoot();
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf,sm);
-    PhysicalExec exec = phyPlanner.createPlan(ctx, plan);
+    PhysicalExec exec = phyPlanner.createPlan(ctx, root);
 
     ProjectionExec proj = (ProjectionExec) exec;
 
@@ -189,7 +187,7 @@ public class TestMergeJoinExec {
           employeeSchema.getColumnByName("empId"));
       outerSortKeys[1] = new SortSpec(
           employeeSchema.getColumnByName("memId"));
-      SortNode outerSort = new SortNode(outerSortKeys);
+      SortNode outerSort = new SortNode(plan.newPID(), outerSortKeys);
       outerSort.setInSchema(outerScan.getSchema());
       outerSort.setOutSchema(outerScan.getSchema());
 
@@ -199,7 +197,7 @@ public class TestMergeJoinExec {
           peopleSchema.getColumnByName("empId"));
       innerSortKeys[1] = new SortSpec(
           peopleSchema.getColumnByName("fk_memid"));
-      SortNode innerSort = new SortNode(innerSortKeys);
+      SortNode innerSort = new SortNode(plan.newPID(), innerSortKeys);
       innerSort.setInSchema(innerScan.getSchema());
       innerSort.setOutSchema(innerScan.getSchema());
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/fc018de8/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
index aa8e4d7..f3aa20a 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
@@ -643,7 +643,7 @@ public class TestPhysicalPlanner {
     LogicalPlan plan = planner.createPlan(context);
     LogicalNode rootNode = optimizer.optimize(plan);
     LogicalRootNode root = (LogicalRootNode) rootNode;
-    UnionNode union = new UnionNode(root.getChild(), root.getChild());
+    UnionNode union = new UnionNode(plan.newPID(), root.getChild(), root.getChild());
     root.setChild(union);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf,sm);


Mime
View raw message