Package org.teiid.query.optimizer.capabilities

Examples of org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder


            "                <Quantity>4</Quantity>\r\n" //$NON-NLS-1$
            "            </Item>\r\n" //$NON-NLS-1$
            "        </Items>\r\n" //$NON-NLS-1$
            "    </Catalog>\r\n" //$NON-NLS-1$
            "</Catalogs>\r\n\r\n"; //$NON-NLS-1$
        helpTestProcess("select (call xmltest.vsp1(y)) from texttable(unescape('1\n100\n1000') COLUMNS y integer) as x", metadata, dataMgr, null, new DefaultCapabilitiesFinder(), expectedDoc1, expectedDoc2, expectedDoc3);         //$NON-NLS-1$
    }
View Full Code Here


        }
        QueryRewriter.rewrite(userCommand, metadata, new CommandContext());

        AnalysisRecord analysisRecord = new AnalysisRecord(false, DEBUG);
        try {
          if ( capabilitiesFinder == null ) capabilitiesFinder = new DefaultCapabilitiesFinder();
          ProcessorPlan plan = QueryOptimizer.optimizePlan(userCommand, metadata, null, capabilitiesFinder, analysisRecord, null);

            return plan;
        } finally {
            if(DEBUG) {
View Full Code Here

  private void execute(String sql, List<?>... expectedResults) throws Exception {
    CommandContext cc = TestProcessor.createCommandContext();
    cc.setTempTableStore(tempStore);
    cc.setGlobalTableStore(globalStore);
    cc.setMetadata(metadata);
    CapabilitiesFinder finder = new DefaultCapabilitiesFinder();
    previousPlan = TestProcessor.helpGetPlan(TestProcessor.helpParse(sql), metadata, finder, cc);
    cc.setQueryProcessorFactory(new QueryProcessorFactoryImpl(BufferManagerFactory.getStandaloneBufferManager(), dataManager, finder, null, metadata));
    TestProcessor.doProcess(previousPlan, dataManager, expectedResults, cc);
  }
View Full Code Here

          dataManager = new FakeDataManager();
            TestProcessor.sampleData1((FakeDataManager)dataManager);   
        }
       
        if ( capFinder == null ) {
          capFinder = new DefaultCapabilitiesFinder();
        }
       
        if ( prepPlanCache == null ) {
          prepPlanCache = new SessionAwareCache<PreparedPlan>();
        }
View Full Code Here

        TestOptimizer.checkNodeTypes(plan.processPlan, TestOptimizer.FULL_PUSHDOWN)
    }
   
  static public PreparedStatementRequest helpGetProcessorPlan(String preparedSql, List values, SessionAwareCache<PreparedPlan> prepPlanCache)
      throws TeiidComponentException, TeiidProcessingException {     
    return helpGetProcessorPlan(preparedSql, values, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), prepPlanCache, SESSION_ID, false, false, FakeMetadataFactory.example1VDB());
    }
View Full Code Here

 
  static public PreparedStatementRequest helpGetProcessorPlan(String preparedSql, List values,
      SessionAwareCache<PreparedPlan> prepPlanCache, int conn)
      throws TeiidComponentException, TeiidProcessingException {
    return helpGetProcessorPlan(preparedSql, values,
        new DefaultCapabilitiesFinder(), FakeMetadataFactory
            .example1Cached(), prepPlanCache, conn, false, false, FakeMetadataFactory.example1VDB());
  }
View Full Code Here

       
        List values = Arrays.asList("0"); //$NON-NLS-1$
       
        SessionAwareCache<PreparedPlan> planCache = new SessionAwareCache<PreparedPlan>();
       
    helpGetProcessorPlan(preparedSql, values, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), planCache, SESSION_ID, false, true, FakeMetadataFactory.example1VDB());

    helpGetProcessorPlan(preparedSql, values, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), planCache, SESSION_ID, false, true, FakeMetadataFactory.example1VDB());
    //make sure the plan wasn't reused
    assertEquals(0, planCache.getCacheHitCount());
    }
View Full Code Here

        dataManager.addData("SELECT g_0.e1 FROM g1 AS g_0 WHERE g_0.e2 IN (SELECT g_1.e2 FROM g2 AS g_1 WHERE g_1.e1 = 'a')", new List[] {Arrays.asList("a")});
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
      caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
       
    helpTestProcessing(preparedSql, values, expected, dataManager, new DefaultCapabilitiesFinder(caps), metadata, null, false, false, false, FakeMetadataFactory.example1VDB());
    }
View Full Code Here

       
        context = new CommandContext();
        context.setProcessorID(requestID);
        context.setVdbName("test"); //$NON-NLS-1$
        context.setVdbVersion(1);
        context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bs.getBufferManager(), dtm, new DefaultCapabilitiesFinder(), null, metadata));
        workItem = TestDQPCoreRequestHandling.addRequest(rm, original, requestID, null, workContext);
       
        request = new AtomicRequestMessage(original, workContext, nodeId);
        request.setCommand(command);
        request.setConnectorName("FakeConnectorID"); //$NON-NLS-1$
View Full Code Here

      final BasicSourceCapabilities caps = getTypicalCapabilities();
      if (!supportsJoins) {
        caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, false);
        caps.setCapabilitySupport(Capability.QUERY_ORDERBY, false);
      }
        return new DefaultCapabilitiesFinder(caps);
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder

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.