Package org.teiid.query.processor.relational

Examples of org.teiid.query.processor.relational.RelationalNode$ProcessingState


        ProcessorPlan plan = TestOptimizer.helpPlan(userQuery, FakeMetadataFactory.example1Cached(),
            new String[] {} );
       
        RelationalPlan rplan = (RelationalPlan)plan;

        RelationalNode root = rplan.getRootNode();
       
        while (root.getChildren() != null) {
            root = root.getChildren()[0];
           
            if (root instanceof DependentProcedureExecutionNode) {
                break;
            }
        }
View Full Code Here


    }
               
    RelationalPlan rplan = (RelationalPlan) plan;
   
    // Check that the plan is just an access node               
    RelationalNode accessNode = rplan.getRootNode();
   
    if (accessNode instanceof LimitNode) {
      LimitNode ln = (LimitNode)accessNode;
      if (!ln.isImplicit()) {
        return null;
      }
      accessNode = ln.getChildren()[0];
    }
   
    if (! (accessNode instanceof AccessNode) || accessNode.getChildren()[0] != null) {
      return null;
    }
   
    // Check that command in access node is a query
    Command command = ((AccessNode)accessNode).getCommand();
View Full Code Here

        ProcessorPlan plan = helpGetPlan(command, metadata, capFinder,context);
       
        //Verify a dependent join (not merge join) was used
        assertTrue(plan instanceof RelationalPlan);
        RelationalPlan relationalPlan = (RelationalPlan)plan;
        RelationalNode project = relationalPlan.getRootNode();
        RelationalNode join = project.getChildren()[0];
        assertTrue("Expected instance of JoinNode (for dep join) but got " + join.getClass(), join instanceof JoinNode); //$NON-NLS-1$

        // Run query
        helpProcess(plan, context, dataManager, expected);       
    }    
View Full Code Here

        ProcessorPlan plan = helpGetPlan(command, metadata, capFinder, context);
       
        //Verify a dependent join (not merge join) was used
        assertTrue(plan instanceof RelationalPlan);
        RelationalPlan relationalPlan = (RelationalPlan)plan;
        RelationalNode project = relationalPlan.getRootNode();
        RelationalNode join = project.getChildren()[0];
        assertTrue("Expected instance of JoinNode (for dep join) but got " + join.getClass(), join instanceof JoinNode); //$NON-NLS-1$

        // Run query
        helpProcess(plan, context, dataManager, expected);       
    }     
View Full Code Here

        ProcessorPlan plan = TestProcessor.helpGetPlan(command, fakeMetadata, capFinder);
       
        //Verify a dependent join (not merge join) was used
        assertTrue(plan instanceof RelationalPlan);
        RelationalPlan relationalPlan = (RelationalPlan)plan;
        RelationalNode project = relationalPlan.getRootNode();
        RelationalNode join = project.getChildren()[0];
        assertTrue("Expected instance of JoinNode (for dep join) but got " + join.getClass(), join instanceof JoinNode); //$NON-NLS-1$

        // Run query
        TestProcessor.helpProcess(plan, dataManager, expected);         
    }
View Full Code Here

        ProcessorPlan plan = TestProcessor.helpGetPlan(command, fakeMetadata, capFinder);

        //Verify a dependent join (not merge join) was used
        assertTrue(plan instanceof RelationalPlan);
        RelationalPlan relationalPlan = (RelationalPlan)plan;
        RelationalNode project = relationalPlan.getRootNode();
        RelationalNode join = project.getChildren()[0];
        assertTrue("Expected instance of JoinNode (for dep join) but got " + join.getClass(), join instanceof JoinNode); //$NON-NLS-1$

        // Run query
        TestProcessor.helpProcess(plan, dataManager, expected);
    }
View Full Code Here

    public TestRelationalPlan(String arg0) {
        super(arg0);
    }
   
    public void testNoRowsFirstBatch() throws Exception {
        RelationalNode node = new FakeRelationalNode(0, new List[0]);
       
        RelationalPlan plan = new RelationalPlan(node);
        TupleBatch batch = plan.nextBatch();
        assertTrue("Did not get terminator batch", batch.getTerminationFlag()); //$NON-NLS-1$
    }  
View Full Code Here

      multiSource = false;
    }
  }

  protected RelationalNode convertNode(PlanNode planNode) throws QueryPlannerException, TeiidComponentException {
    RelationalNode node = super.convertNode(planNode);
   
    if (node instanceof AccessNode) {
      try {
        return multiSourceModify((AccessNode)node);
      } catch (TeiidProcessingException e) {
View Full Code Here

               
                for (AccessNode newNode : accessNodes) {
                  unionNode.addChild(newNode);
                }
             
              RelationalNode parent = unionNode;
             
                // More than 1 access node - replace with a union
              if (RelationalNodeUtil.isUpdate(accessNode.getCommand())) {
                update = true;
                GroupingNode groupNode = new GroupingNode(getID());                   
View Full Code Here

       
        int cardinality = QueryMetadataInterface.UNKNOWN_CARDINALITY;
       
        if (plan instanceof RelationalPlan) {
            RelationalPlan relationalPlan = (RelationalPlan)plan;
            RelationalNode root = relationalPlan.getRootNode();
            //since the root will be a project into node, get the cost from its child
            if (root.getChildren()[0] != null) {
                root = root.getChildren()[0];
            }
            Number planCardinality = root.getEstimateNodeCardinality();
           
            if (planCardinality == null || planCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE) {
                //don't stage unknown cost without criteria
                if (implicit && query.getCriteria() == null) {
                    return false;
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.relational.RelationalNode$ProcessingState

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.