pig.registerQuery("D = order C by $1;");
pig.registerQuery("E = limit D 10;");
pig.registerQuery("store E into 'alias_output';");
LogicalPlan lp = getLogicalPlan(pig);
lp.optimize(pig.getPigContext());
PhysicalPlan pp = ((MRExecutionEngine)pig.getPigContext().getExecutionEngine()).compile(lp,
null);
MROperPlan mp = getMRPlan(pp, pig.getPigContext());
assertEquals(4, mp.getKeys().size());