use of org.teiid.query.processor.proc.CreateCursorResultSetInstruction in project teiid by teiid.
the class TestProcedureRelational method helpTestProcRelational.
private void helpTestProcRelational(String userQuery, String inputCriteria, String atomicQuery) {
ProcessorPlan plan = TestOptimizer.helpPlan(userQuery, RealMetadataFactory.example1Cached(), new String[] {});
RelationalPlan rplan = (RelationalPlan) plan;
RelationalNode root = rplan.getRootNode();
while (root.getChildren() != null) {
root = root.getChildren()[0];
if (root instanceof DependentProcedureExecutionNode) {
break;
}
}
DependentProcedureExecutionNode dep = (DependentProcedureExecutionNode) root;
assertEquals(inputCriteria, dep.getInputCriteria().toString());
ProcedurePlan pp = (ProcedurePlan) dep.getProcessorPlan();
CreateCursorResultSetInstruction ccrsi = (CreateCursorResultSetInstruction) pp.getOriginalProgram().getInstructionAt(0);
plan = ccrsi.getCommand();
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
TestOptimizer.checkAtomicQueries(new String[] { atomicQuery }, plan);
}
Aggregations