Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.Command


        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();

        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, false);   
        finder.addCapabilities("Europe", caps);//$NON-NLS-1$
        finder.addCapabilities("CustomerMaster", caps);//$NON-NLS-1$
View Full Code Here


        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();
       
        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_ORDERBY, false);
        caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, false);
        caps.setCapabilitySupport(Capability.CRITERIA_IN, setPushdown);   
View Full Code Here

        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();

        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps1 = TestOptimizer.getTypicalCapabilities();
        BasicSourceCapabilities caps2 = TestOptimizer.getTypicalCapabilities();
        caps2.setCapabilitySupport(Capability.CRITERIA_IN, false);   
        finder.addCapabilities("US", caps1); //$NON-NLS-1$
View Full Code Here

        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();

        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, false);   
        finder.addCapabilities("Europe", caps);//$NON-NLS-1$
        finder.addCapabilities("CustomerMaster", caps);//$NON-NLS-1$
View Full Code Here

        overrideVirtualDepJoinData(dataManager, metadata, unique);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();

        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setSourceProperty(Capability.MAX_IN_CRITERIA_SIZE, new Integer(1));
        finder.addCapabilities("US", caps); //$NON-NLS-1$
        finder.addCapabilities("Europe", caps);//$NON-NLS-1$
View Full Code Here

        FakeMetadataFacade metadata = exampleVirtualDepJoin();       
        FakeDataManager dataManager = new FakeDataManager();
        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_IN, pushCriteria);   
        finder.addCapabilities("US", caps); //$NON-NLS-1$
        finder.addCapabilities("Europe", caps);//$NON-NLS-1$
View Full Code Here

        sampleDataVirtualDepJoin(dataManager, metadata);
        
        // Plan query
        CommandContext context = TestProcessor.createCommandContext();

        Command command = TestProcessor.helpParse(sql);  
        FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, false);   
        finder.addCapabilities("Europe", caps);//$NON-NLS-1$
        finder.addCapabilities("CustomerMaster", caps);//$NON-NLS-1$
View Full Code Here

    }

    // Assume there is a wrapped command - this will allow subqueries to be properly resolved
    public void helpTestVisitorWithCommand(String sql, Object modelID, FakeMetadataFacade metadata, CapabilitiesFinder capFinder, boolean isValid, boolean expectException) {
        try {
            Command command = QueryParser.getQueryParser().parseCommand(sql);
           
            QueryResolver.resolveCommand(command, metadata);
                       
            assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(command, modelID, metadata, capFinder, null)); //$NON-NLS-1$
        } catch(QueryMetadataException e) {
View Full Code Here

            return;
        }

        switch (nodeType) {
        case NodeConstants.Types.ACCESS:
            Command command = FrameUtil.getNonQueryCommand(root);
              if (command instanceof StoredProcedure) {
                  //if the access node represents a stored procedure, then we can't actually change the output symbols
                  root.setProperty(NodeConstants.Info.OUTPUT_COLS, command.getProjectedSymbols());
              }
        case NodeConstants.Types.TUPLE_LIMIT:
        case NodeConstants.Types.DUP_REMOVE:
        case NodeConstants.Types.SORT:
          if (root.hasBooleanProperty(NodeConstants.Info.UNRELATED_SORT)) {
View Full Code Here

    }

    // ################################## TEST HELPERS ################################

    public static XMLPlan helpPlan(String sql, QueryMetadataInterface md) throws Exception {
        Command command = TestXMLProcessor.helpGetCommand(sql, md);
        return preparePlan(command, md, TestOptimizer.getGenericFinder(), null);
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.Command

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.