Util.createInputFile(pig.getPigContext(),outputFileName, input);
String query = "a = load '" + inputFileName + "' as (c:chararray, " +
"i:int,d:double);" +
"store a into '" + outputFileName + "' using PigStorage();";
org.apache.pig.newplan.logical.relational.LogicalPlan lp = Util.buildLp( pig, query );
new InputOutputFileValidator(lp, pig.getPigContext()).validate();
} catch (FrontendException pve){
// Since output file is present, validation should fail
// and throw this exception
assertEquals(6000,pve.getErrorCode());
assertEquals(PigException.REMOTE_ENVIRONMENT, pve.getErrorSource());