Package org.teiid.query.processor.proc

Examples of org.teiid.query.processor.proc.ProcedurePlan


       
        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);
       
View Full Code Here


    ForEachRowPlan result = new ForEachRowPlan();
    result.setParams(params);
    ProcessorPlan queryPlan = QueryOptimizer.optimizePlan(query, metadata, idGenerator, capFinder, analysisRecord, context);
    result.setQueryPlan(queryPlan);
    result.setLookupMap(RelationalNode.createLookupMap(query.getProjectedSymbols()));
    ProcedurePlan rowProcedure = (ProcedurePlan)QueryOptimizer.optimizePlan(new CreateUpdateProcedureCommand(ta.getBlock()), metadata, idGenerator, capFinder, analysisRecord, context);
    result.setRowProcedure(rowProcedure);
    return result;
  }
View Full Code Here

        if(debug) {
            analysisRecord.println("\n####################################################"); //$NON-NLS-1$
        }
               
        // create plan from program and initialized environment
        ProcedurePlan plan = new ProcedurePlan(programBlock);
       
        plan.setUpdateProcedure(cupc.isUpdateProcedure());
        plan.setOutputElements(cupc.getProjectedSymbols());
       
        if(debug) {
            analysisRecord.println("####################################################"); //$NON-NLS-1$
            analysisRecord.println("PROCEDURE PLAN :"+plan); //$NON-NLS-1$
            analysisRecord.println("####################################################"); //$NON-NLS-1$
View Full Code Here

          context.accessedPlanningObject(id);
        }
      }
          // propagate procedure parameters to the plan to allow runtime type checking
          ProcedureContainer container = (ProcedureContainer)cupc.getUserCommand();
          ProcedurePlan plan = (ProcedurePlan)result;
          if (container != null) {
            LinkedHashMap<ElementSymbol, Expression> params = container.getProcedureParameters();
            if (container instanceof StoredProcedure) {
              plan.setRequiresTransaction(container.getUpdateCount() > 0);
              StoredProcedure sp = (StoredProcedure)container;
              if (sp.returnParameters()) {
                List<ElementSymbol> outParams = new LinkedList<ElementSymbol>();
                for (SPParameter param : sp.getParameters()) {
              if (param.getParameterType() == SPParameter.RETURN_VALUE) {
                outParams.add(param.getParameterSymbol());
              }
            }
                for (SPParameter param : sp.getParameters()) {
              if (param.getParameterType() == SPParameter.INOUT ||
                  param.getParameterType() == SPParameter.OUT) {
                outParams.add(param.getParameterSymbol());
              }
            }
                if (outParams.size() > 0) {
                  plan.setOutParams(outParams);
                }
              }
            }
              plan.setParams(params);
              plan.setMetadata(metadata);
              if (container instanceof TranslatableProcedureContainer) {
                plan.setImplicitParams(((TranslatableProcedureContainer)container).getImplicitParams());
              }
          }
          break;
    case Command.TYPE_BATCHED_UPDATE:
      result = BATCHED_UPDATE_PLANNER.optimize(command, idGenerator, metadata, capFinder, analysisRecord, context);
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.proc.ProcedurePlan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.