Search in sources :

Example 31 with AnalysisRecord

use of org.teiid.query.analysis.AnalysisRecord in project teiid by teiid.

the class BaseQueryTest method doProcess.

protected void doProcess(QueryMetadataInterface metadata, String sql, CapabilitiesFinder capFinder, ProcessorDataManager dataManager, List[] expectedResults, boolean debug, CommandContext context) throws TeiidComponentException, TeiidProcessingException, QueryMetadataException, QueryPlannerException, Exception {
    Command command = TestOptimizer.helpGetCommand(sql, metadata, null);
    // plan
    AnalysisRecord analysisRecord = new AnalysisRecord(false, debug);
    ProcessorPlan plan = null;
    try {
        plan = QueryOptimizer.optimizePlan(command, metadata, null, capFinder, analysisRecord, context);
    } finally {
        if (debug) {
            System.out.println(analysisRecord.getDebugLog());
        }
    }
    TestProcessor.doProcess(plan, dataManager, expectedResults, context);
}
Also used : AnalysisRecord(org.teiid.query.analysis.AnalysisRecord) Command(org.teiid.query.sql.lang.Command) ProcessorPlan(org.teiid.query.processor.ProcessorPlan)

Aggregations

AnalysisRecord (org.teiid.query.analysis.AnalysisRecord)31 Command (org.teiid.query.sql.lang.Command)21 Test (org.junit.Test)19 QueryMetadataInterface (org.teiid.query.metadata.QueryMetadataInterface)16 Annotation (org.teiid.client.plan.Annotation)9 ProcessorPlan (org.teiid.query.processor.ProcessorPlan)9 CommandContext (org.teiid.query.util.CommandContext)8 DefaultCapabilitiesFinder (org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder)7 TransformationMetadata (org.teiid.query.metadata.TransformationMetadata)4 BasicSourceCapabilities (org.teiid.query.optimizer.capabilities.BasicSourceCapabilities)4 RelationalPlan (org.teiid.query.processor.relational.RelationalPlan)4 ValidatorReport (org.teiid.query.validator.ValidatorReport)4 QueryPlannerException (org.teiid.api.exception.query.QueryPlannerException)3 QueryValidatorException (org.teiid.api.exception.query.QueryValidatorException)3 TeiidProcessingException (org.teiid.core.TeiidProcessingException)3 TempMetadataAdapter (org.teiid.query.metadata.TempMetadataAdapter)3 TempMetadataStore (org.teiid.query.metadata.TempMetadataStore)3 GlobalTableStoreImpl (org.teiid.query.tempdata.GlobalTableStoreImpl)3 TeiidComponentException (org.teiid.core.TeiidComponentException)2 TeiidRuntimeException (org.teiid.core.TeiidRuntimeException)2