@Test public void testMetaClassFullTableScan() { MetaClass meta = repositoryService.getRepository(cmsdbContext.getRepositoryName()).getMetadataService().getMetaClass("Rack"); meta.setAllowFullTableScan(true); QueryContext context = new QueryContext(cmsdbContext); context.setAllowFullTableScan(false); context.setRepositoryService(repositoryService); QueryParser cmsdbParser = new QueryParser(context); String query = "Rack"; QueryExecPlan plan = getTranslator(context).translate(cmsdbParser.parse(query)); QueryOptimizer optimizer = new QueryOptimizer(context); optimizer.optimize(plan); meta.setAllowFullTableScan(false); }
public void optimize(QueryExecPlan plan) { AbstractAction rootAction = plan.getRootAction(); optimizeAction(rootAction); checkFullTableScan(rootAction); }
QueryOptimizer { public void optimize(QueryExecPlan plan) { AbstractAction rootAction = plan.getRootAction(); optimizeAction(rootAction); checkFullTableScan(rootAction); } }
QueryOptimizer { public void optimize(QueryExecPlan plan) { AbstractAction rootAction = plan.getRootAction(); optimizeAction(rootAction); checkFullTableScan(rootAction); } QueryOptimizer(QueryContext context); }
QueryOptimizer { public void optimize(QueryExecPlan plan) { AbstractAction rootAction = plan.getRootAction(); optimizeAction(rootAction); checkFullTableScan(rootAction); } QueryOptimizer(QueryContext context); void optimize(QueryExecPlan plan); }
QueryOptimizer { public void optimize(QueryExecPlan plan) { AbstractAction rootAction = plan.getRootAction(); optimizeAction(rootAction); checkFullTableScan(rootAction); } QueryOptimizer(QueryContext context); void optimize(QueryExecPlan plan);  }