use of com.cubrid.common.core.queryplan.PlanParser in project cubrid-manager by CUBRID.
the class PlanParserTest method testExam07.
/**
* Partitioned table
*
* @throws Exception
*/
public void testExam07() throws Exception {
String planString = loadPlanExmaple("plan07.txt");
PlanParser parser = new PlanParser();
boolean bool = parser.doParse(planString);
assertFalse(bool);
}
use of com.cubrid.common.core.queryplan.PlanParser in project cubrid-manager by CUBRID.
the class PlanParserTest method testExam02.
/**
* complicated plan
*
* @throws Exception
*/
public void testExam02() throws Exception {
String planString = loadPlanExmaple("plan02.txt");
PlanParser parser = new PlanParser();
boolean bool = parser.doParse(planString);
assertTrue(bool);
int subPlanCount = parser.countPlanTree();
assertEquals(10, subPlanCount);
for (int i = 0; i < subPlanCount; i++) {
PlanResult planRoot = parser.getPlanTree(i);
assertNotNull(planRoot);
}
}
use of com.cubrid.common.core.queryplan.PlanParser in project cubrid-manager by CUBRID.
the class PlanParserTest method testExam04.
/**
* Partitioned table
*
* @throws Exception
*/
public void testExam04() throws Exception {
String planString = loadPlanExmaple("plan04.txt");
PlanParser parser = new PlanParser();
boolean bool = parser.doParse(planString);
assertFalse(bool);
}
use of com.cubrid.common.core.queryplan.PlanParser in project cubrid-manager by CUBRID.
the class PlanParserTest method testExam01.
/**
* simple plan
*
* @throws Exception
*/
public void testExam01() throws Exception {
String planString = loadPlanExmaple("plan01.txt");
PlanParser parser = new PlanParser();
boolean bool = parser.doParse(planString);
assertTrue(bool);
parser.getPlanTree(1);
PlanResult planRoot = parser.getPlanTree(0);
assertNotNull(planRoot);
PlanNode planNode = planRoot.getPlanNode();
assertEquals(planNode.getMethod(), "idx-join (inner join)");
assertEquals(planNode.getDepth(), 1);
PlanCost planCost = planNode.getCost();
assertNotNull(planCost);
assertEquals(planCost.getCard(), 40);
assertEquals(String.valueOf(planCost.getFixedCpu()), "0.0");
assertEquals(String.valueOf(planCost.getFixedDisk()), "2.0");
assertEquals(String.valueOf(planCost.getFixedTotal()), "2.0");
assertEquals(String.valueOf(planCost.getVarCpu()), "100.3");
assertEquals(String.valueOf(planCost.getVarDisk()), "275.0");
assertEquals(String.valueOf(planCost.getVarTotal()), "375.0");
assertNull(planNode.getTable());
assertNull(planNode.getIndex());
assertNull(planNode.getEdge());
assertNull(planNode.getFilter());
assertNull(planNode.getSort());
assertNull(planNode.getOrder());
PlanTerm sargs = planNode.getSargs();
assertNotNull(sargs);
assertNotNull(planNode.getChildren());
assertEquals(planNode.getChildren().size(), 2);
PlanParser parser2 = new PlanParser();
parser2.getPlanTree(0);
parser2.countPlanTree();
parser2.doParse(null);
parser2.doParse("aaa");
}
use of com.cubrid.common.core.queryplan.PlanParser in project cubrid-manager by CUBRID.
the class PlanParserTest method testExam06.
/**
* Partitioned table
*
* @throws Exception
*/
public void testExam06() throws Exception {
String planString = loadPlanExmaple("plan06.txt");
PlanParser parser = new PlanParser();
boolean bool = parser.doParse(planString);
assertFalse(bool);
}
Aggregations