You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2013/05/04 00:00:16 UTC

[jira] [Commented] (PIG-2248) Pig parser does not detect when a macro name masks a UDF name

    [ https://issues.apache.org/jira/browse/PIG-2248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13648831#comment-13648831 ] 

Daniel Dai commented on PIG-2248:
---------------------------------

Actually, I feel the check is very involved in the patch. Now we check UDF (after going through all the classloader trick), how about default/define? How about keyword? We need to exhaustively check everything and make sure there is no conflict. On the other side, how about defining an order Pig resolve a symbol, and clearly documented. 

At this moment I would prefer documenting the symbol resolving order, unless a cleaner solution is proposed.
                
> 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-2248.patch.txt, PIG-2248.patch.txt, 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