org.apache.pig.newplan.logical.relational.LogicalPlan plan = Util.buildLp(pigServer, query);
// this will run ImplicitSplitInserter
new LogicalPlanOptimizer( plan, 5, null ).optimize();
// get Schema of leaf and compare:
String expectedSchema = "group:int,a::name:chararray,a::marks:int,d::group:chararray,d::newmarks:int";
assertEquals(expectedSchema, ((LogicalRelationalOperator)plan.getSinks().get(0)).getSchema().toString(false));
}