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

Johnny Zhang commented on PIG-2244:
-----------------------------------

Thanks for the comments, Daniel! Right now the error message looks like
{noformat}
ERROR 1000: Error during parsing. Pig script failed to parse:
at expanding macro 'simple_macro' (macro1.pig:6)
<file macro1.pig, line 2, column 11> Undefined alias: macro_simple_macro_a_0
{noformat}

So if 'a' is expanded to a (change made by the patch), instead of 
macro_simple_macro_a_0, then Pig will be able to figure out a is a defined 
alias, then there will be no error message thrown.

If the intent of the jira is to throw a better error message, then we will 
check if any quoted string equals to a existing alias, fail the job and throw 
error message like:
"should not use quoted alias as macro arguments" or "should not use quoted 
macro argument to mask an existing alias".

If you think it is the later case, I will try to post another patch. Thanks!
                
> Macros cannot be passed relation names
> --------------------------------------
>
>                 Key: PIG-2244
>                 URL: https://issues.apache.org/jira/browse/PIG-2244
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9.0
>            Reporter: Alan Gates
>            Assignee: Johnny Zhang
>            Priority: Minor
>         Attachments: PIG-2244.patch.txt
>
>
> If an alias is passed quoted, it gets expanded as if it were an alias in the 
> macro, which leads to a very strange error message.

--
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

Reply via email to