}
@Test
public void testSortOptimization1() throws Exception {
// Sort on something other than the main key
LogicalPlanTester planTester = new LogicalPlanTester();
planTester.buildPlan("A = LOAD 'input1' AS (a0, a1, a2);");
planTester.buildPlan("B = group A by $0;");
planTester.buildPlan("C = foreach B { D = limit A 10; E = order D by $1; generate group, E;};");
LogicalPlan lp = planTester.buildPlan("store C into '/tmp';");
PhysicalPlan pp = Util.buildPhysicalPlan(lp, pc);
MROperPlan mrPlan = Util.buildMRPlan(pp, pc);
SecondaryKeyOptimizer so = new SecondaryKeyOptimizer(mrPlan);
so.visit();