Vivek Padmanabhan
added a comment - 25/Aug/11 06:51 Looks like this issue was introduced as part of the parser changes.
In Pig 0.9, the validation is done like below;
In org.apache.pig.parser.AstValidator
private void validateAliasRef(Set<String> aliases, CommonTree node, String alias)
throws UndefinedAliasException {
if( !aliases.contains( alias ) )
{
throw new UndefinedAliasException( input, new SourceLocation( (PigParserNode)node ), alias );
}
}
Here it just checks that the alias is contained inside the set "aliases", but this contains all the aliases
and it doesnt check for the order in which they are defined in the script.
Hence this will lead to other sort of issues like NullPointerException, if i replace the F in the above script with
below
F = foreach F generate *;

Olga Natkovich
added a comment - 25/Aug/11 23:18 I suggest that we fix it as part of 0.9.1 since it is a regression and it makes error messages worse even though the release claimed to improve error handling