[
https://issues.apache.org/jira/browse/PIG-2248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623403#comment-13623403
]
Prashant Kommireddi commented on PIG-2248:
------------------------------------------
Thanks [~dreambird]. I took a quick look and have a couple comments:
# You can check for UDFs in the import list in addition to builtins.
{code}
private static String BUILTINUDF_PACKAGE = "org.apache.pig.builtin";
{code}
You could rather use PigContext.getPackageImportList() for the comprehensive
list.
# Use commons logging instead of printing stacktrace
{code}
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
{code}
I haven't dived deeper into your patch, but these couple things caught my eye
at first.
> Pig parser does not detect when a macro name masks a UDF name
> -------------------------------------------------------------
>
> Key: PIG-2248
> URL: https://issues.apache.org/jira/browse/PIG-2248
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.9.0
> Reporter: Alan Gates
> Assignee: Johnny Zhang
> Priority: Minor
> Attachments: PIG-2248.patch.txt
>
>
> Pig accepts a macro like:
> {code}
> define COUNT(in_relation, min_gpa) returns c {
> b = filter $in_relation by gpa >= $min_gpa;
> $c = foreach b generate age, name;
> }
> {code}
> This should produce a warning that it is masking a UDF.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira