String inputfile = generateTempFile().getAbsolutePath() ;
String outputfile = generateTempFile().getAbsolutePath() ;
LogicalPlan plan = genNewLoadStorePlan(inputfile, outputfile, ctx.getDfs()) ;
CompilationMessageCollector collector = new CompilationMessageCollector() ;
boolean isBeforeOptimizer = false; // we are not optimizing in this testcase
LogicalPlanValidationExecutor executor = new LogicalPlanValidationExecutor(plan, ctx, isBeforeOptimizer) ;
try {
executor.validate(plan, collector) ;
fail("Expected to fail.");
} catch (Exception pve) {
//good
}
assertEquals(collector.size(), 3) ;
for(int i = 0; i < collector.size(); ++i) {
assertEquals(collector.get(i).getMessageType(), MessageType.Error) ;
}
}