@Test(expected=QueryOptimizeException.class) public void testFullTableScan() { cmsdbContext.setAllowFullTableScan(false); String query = "Rack[@assets.$_length > 120]{@_oid, @assets.$_length}.assets[@assetStatus = \"IN SERVICE\"].asset!AssetServer{@resourceId,@type}"; QueryExecPlan plan = getTranslator(cmsdbContext).translate(cmsdbParser.parse(query)); QueryOptimizer optimizer = new QueryOptimizer(cmsdbContext); optimizer.optimize(plan); }
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);  }