We are working on the Pig Logical Optimizer, and running into some difficulty navigating the plan.
If we run explain on a query with a CoGroup, we get something like: Cogroup | | | |-- Project [0] | |------ ForEach | <etc> What we want to do is determine that this particular Cogroup operates on a projection of field 0. If we create a new LogicalTransformer that is applied to Cogroup operators, and call mPlan.getPredecessors(ourCogroupOperator) , we only get the ForEach. Calling getSuccessors results in a null being returned (Cogroup is indeed the root). How do we find the Project operator above? What is its relationship, plan-wise, with the Cogroup operator? Thanks a lot, Dmitriy Ryaboy, Ashutosh Chauhan, Tejal Desai