pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2248) Pig parser does not detect when a macro name masks a UDF name
Date Tue, 23 Apr 2013 01:10:13 GMT

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

Johnny Zhang commented on PIG-2248:
-----------------------------------

Daniel, appreciate your time to try out the patch. My apologize miss this case. Not sure why
test pass at the moment when I submit the patch.

I just upload the revised patch and did test for following cases:
1. in one pig script, one macro definition, which mask a builtin UDF COUNT
2. in one pig script, two macro definition, which mask a builtin UDF COUNT and ABS
3. in one pig script, one macro definition, which doesn't mask any builtin UDF
4. in one pig script, two macro definition, both do't mask any builtin UDF
5. in one pig script, two macro definition, one mask builtin UDF COUNT, another macro doesn't
mask any UDF.

They all pass and make sure only one warning message thrown once per one macro if condition
applied.
                
> 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

Mime
View raw message