Review Board 1.7.22


PIG-2248 Pig parser does not detect when a macro name masks a UDF name

Review Request #10435 - Created April 12, 2013 and updated

Johnny Zhang
trunk
PIG-2248
Reviewers
pig
pig-git
Pig accepts a macro like:
define COUNT(in_relation, min_gpa) returns c {
                           b = filter $in_relation by gpa >= $min_gpa;
                           $c = foreach b generate age, name;
                       }
This should produce a warning that it is masking a UDF.
I tested it with two macro defined in one Pig script, there is only one warning message for each macro. The message looks like
[main] WARN  org.apache.pig.parser.PigMacro - macro name 'COUNT' masks a builtin UDF org.apache.pig.builtin.COUNT
[main] WARN  org.apache.pig.parser.PigMacro - macro name 'ABS' masks a builtin UDF org.apache.pig.builtin.ABS
Review request changed
Updated (April 24, 2013, 10:01 p.m.)
update patch to fix error in more test cases