Examples of OptimizerRule


Examples of org.modeshape.jcr.query.optimize.OptimizerRule

            // Create the optimizer for the query engine ...
            IndexPlanners indexPlanners = IndexPlanners.withProviders(plannersByProviderName);
            Optimizer optimizer = optimizer();
            if (optimizer == null) {
                // Create a single indexing rule that will use the index planner from all the providers ...
                final OptimizerRule indexingRule = AddIndexes.with(indexPlanners);
                // Create the optimizer that will add the providers' indexes using the same IndexingRule instance
                optimizer = new RuleBasedOptimizer() {
                    @Override
                    protected void populateIndexingRules( LinkedList<OptimizerRule> ruleStack,
                                                          PlanHints hints ) {
View Full Code Here

Examples of org.teiid.query.optimizer.relational.OptimizerRule

        assertEquals("Initial size is not 0", 0, stack.size()); //$NON-NLS-1$
        assertNull("Top is not null", stack.pop()); //$NON-NLS-1$
    }
   
    public void helpTestPop(RuleStack stack, OptimizerRule expectedPop, int expectedSize) {
        OptimizerRule out = stack.pop();
        int outSize = stack.size();
       
        assertSame("Did not get same object", expectedPop, out); //$NON-NLS-1$
        assertEquals("Stack changed size", expectedSize, outSize);                     //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.optimizer.relational.OptimizerRule

   
    public void testPopOneRule() {
        RuleStack stack = new RuleStack();
        int expectedSize = stack.size();
       
        OptimizerRule rule = new RulePushSelectCriteria();
        stack.push(rule);
       
        helpTestPop(stack, rule, expectedSize);
    }
View Full Code Here

Examples of org.teiid.query.optimizer.relational.OptimizerRule

    CommandContext context = new CommandContext();
    while(! rules.isEmpty()) {
      if(debug) {
        System.out.println("\n============================================================================"); //$NON-NLS-1$
      }
      OptimizerRule rule = rules.pop();
      if(debug) {
        System.out.println("EXECUTING " + rule); //$NON-NLS-1$
      }
            
            plan = rule.execute(plan, metadata, FINDER, rules, new AnalysisRecord(false, debug), context);
      if(debug) {
        System.out.println("\nAFTER: \n" + plan); //$NON-NLS-1$
      }
    }
    return plan;
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.