You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Johnny Zhang <xi...@cloudera.com> on 2013/04/12 22:50:57 UTC
Review Request: PIG-2248 Pig parser does not detect when a macro name masks
a UDF name
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10435/
-----------------------------------------------------------
Review request for pig.
Description
-------
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.
This addresses bug PIG-2248.
https://issues.apache.org/jira/browse/PIG-2248
Diffs
-----
src/org/apache/pig/parser/PigMacro.java 435fc13
Diff: https://reviews.apache.org/r/10435/diff/
Testing
-------
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
Thanks,
Johnny Zhang
Re: Review Request: PIG-2248 Pig parser does not detect when a macro name
masks a UDF name
Posted by Johnny Zhang <xi...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10435/
-----------------------------------------------------------
(Updated April 24, 2013, 10:01 p.m.)
Review request for pig.
Changes
-------
update patch to fix error in more test cases
Description
-------
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.
This addresses bug PIG-2248.
https://issues.apache.org/jira/browse/PIG-2248
Diffs (updated)
-----
src/org/apache/pig/parser/PigMacro.java 435fc13
Diff: https://reviews.apache.org/r/10435/diff/
Testing
-------
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
Thanks,
Johnny Zhang