String msg = "No Plan to compile";
throw new ExecException(msg, errCode, PigException.BUG);
}
try {
LogToPhyTranslationVisitor translator =
new LogToPhyTranslationVisitor(plan);
translator.setPigContext(pigContext);
translator.visit();
return translator.getPhysicalPlan();
} catch (VisitorException ve) {
int errCode = 2042;
String msg = "Internal error. Unable to translate logical plan to physical plan.";
throw new ExecException(msg, errCode, PigException.BUG, ve);
}