LogicalExpression exOp = (LogicalExpression) foreachPlan.getSinks().get(0);
if(! (exOp instanceof ProjectExpression)) exOp = (LogicalExpression) foreachPlan.getSinks().get(1);
CastExpression cast1 = (CastExpression)foreachPlan.getPredecessors(exOp).get(0);
MapLookupExpression map = (MapLookupExpression)foreachPlan.getPredecessors(cast1).get(0);
checkCastLoadFunc(cast1, "PigStorage('a')");
CastExpression cast2 = (CastExpression)foreachPlan.getPredecessors(map).get(0);
checkCastLoadFunc(cast1, "PigStorage('a')");
foreachPlan = ((LOGenerate)foreach.getInnerPlan().getSinks().get(0)).getOutputPlans().get(2);
exOp = (LogicalExpression) foreachPlan.getSinks().get(0);
if(! (exOp instanceof ProjectExpression)) exOp = (LogicalExpression) foreachPlan.getSinks().get(1);
CastExpression cast = (CastExpression)foreachPlan.getPredecessors(exOp).get(0);
checkCastLoadFunc(cast, "PigStorage('b')");
}