public void testNonCollectableLoader() throws Exception{
LogicalPlanTester lpt = new LogicalPlanTester();
lpt.buildPlan("A = LOAD '" + INPUT_FILE + "' as (id, name, grade);");
LogicalPlan lp = lpt.buildPlan("B = group A by id using 'collected';");
PigContext pc = new PigContext(ExecType.MAPREDUCE,cluster.getProperties());
pc.connect();
try {
Util.buildMRPlan(Util.buildPhysicalPlan(lp, pc),pc);
fail("Must throw MRCompiler Exception");
} catch (Exception e) {
assertTrue(e instanceof MRCompilerException);