"C = foreach B { D = limit A 10; E = order D by $1; F = order E by $2; generate group, F;};" +
"store C into 'output';");
PhysicalPlan pp = Util.buildPp(pigServer, query);
MROperPlan mrPlan = Util.buildMRPlan(pp, pc);
SecondaryKeyOptimizer so = new SecondaryKeyOptimizer(mrPlan);
so.visit();
assertTrue(so.getNumMRUseSecondaryKey() == 1);
assertTrue(so.getNumSortRemoved() == 1);
assertTrue(so.getDistinctChanged() == 0);
}