for(LogicalPlan lp: mapGByPlans.get(op)) {
if(checkPlanForProjectStar(lp)) {
// not following Error handling guidelines to give error code
// and error source since this will get swallowed by the parser
// which will just return a ParseException
throw new VisitorException("Cogroup/Group by * is only allowed if " +
"the input has a schema");
}
}
}
// check if after translation all group by plans have same arity
int arity = mapGByPlans.get(cg.getInputs().get(0)).size();
for(LogicalOperator op: cg.getInputs()) {
if(arity != mapGByPlans.get(op).size()) {
// not following Error handling guidelines to give error code
// and error source since this will get swallowed by the parser
// which will just return a ParseException
throw new VisitorException("The arity of cogroup/group by columns " +
"do not match");
}
}
}
}