Examples of RelationalNode


Examples of org.codehaus.preon.el.ast.RelationalNode

    @SuppressWarnings("unchecked")
    @Test
    public void testJustRelation() {
        Node<Integer,?> a = new IntegerNode(12);
        Node<Integer,?> b = new IntegerNode(13);
        Node<Boolean,?> expr = new RelationalNode(Relation.GT, a, b);
        assertEquals(false, expr.eval(null).booleanValue());
    }
View Full Code Here

Examples of org.codehaus.preon.el.ast.RelationalNode

        Node<Integer,?> b = new IntegerNode(13);
        Node<Integer,?> c = new IntegerNode(14);
        Node<Integer,?> d = new IntegerNode(15);
        Node<Integer,?> expr1 = new ArithmeticNode(Operator.plus, a, b);
        Node<Integer,?> expr2 = new ArithmeticNode(Operator.minus, c, d);
        Node<Boolean,?> expr = new RelationalNode(Relation.GT, expr1, expr2);
        assertEquals(true, expr.eval(null).booleanValue());
    }
View Full Code Here

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

        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

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

    }
               
    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

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

        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

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

        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

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

        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

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

        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

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

    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

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

      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
TOP
Copyright © 2018 www.massapi.com. 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.