LogicalPlan plan = Util.buildLp(new PigServer(pc), query);
Rule rule = new PartitionFilterOptimizer("test");
List<OperatorPlan> matches = rule.match(plan);
if (matches != null) {
Transformer transformer = rule.getNewTransformer();
for (OperatorPlan m : matches) {
if (transformer.check(m)) {
transformer.transform(m);
}
}
OperatorSubPlan newPlan = (OperatorSubPlan)transformer.reportChanges();
Assert.assertTrue(newPlan.getBasePlan().size() == 3);
}
}