public void setSecondaryPlans(List<PhysicalPlan> plans) throws PlanException {
this.secondaryPlans = plans;
secondaryLeafOps.clear();
int keyIndex = 0; // zero based index for fields in the key
for (PhysicalPlan plan : plans) {
ExpressionOperator leaf = (ExpressionOperator)plan.getLeaves().get(0);
secondaryLeafOps.add(leaf);
// don't optimize CROSS
if(!isCross) {
// Look for the leaf Ops which are POProject operators - get the