[
https://issues.apache.org/jira/browse/PIG-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13641024#comment-13641024
]
Johnny Zhang commented on PIG-2244:
-----------------------------------
I take a closer look at PIG-2378. I think PIG-2378 and PIG-2244 is not related,
we can fix them separately.
1. the purpose of PIG-2244 is prevent use quoted alias as macro argument,
however, quoted string as argument itself should still be allowed, as long as
it is not quoted alias.
look at
https://github.com/apache/pig/blob/trunk/src/org/apache/pig/parser/QueryParser.g#L275
it is totally fine to use quoted string as line parameters, I think change the
behavior here is risky bring regression on many other Pig functionality.
{code}
parameter
: IDENTIFIER
| INTEGER
| DOUBLENUMBER
| BIGDECIMALNUMBER
| BIGINTEGERNUMBER
| QUOTEDSTRING
| DOLLARVAR
;
inline_param_clause : LEFT_PAREN ( parameter (COMMA parameter)* )? RIGHT_PAREN
-> ^(PARAMS parameter*)
;
{code}
However, the patch for PIG-2244 is catch whether quoted alias is used in macro
argument in AliasMasker.g, which happens after QueryParser.g. so fixing
PIG-2244 doesn't close the 'back door' of PIG-2378. Even PIG-2244 is fixed,
using PIG-2378 workaround will not hit the exception throw from AliasMasker.g
2. the purpose of PIG-2378 is totally enhancement, that said, we can passed
quoted string as inline arguments, which should work, but we should also try to
allow non-quoted tutple.item used as macro argument. But it is not the same as
issue we faced here.
Please let me know your thoughts, 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, PIG-2244.patch.txt,
> 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