[
https://issues.apache.org/jira/browse/PIG-3394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720447#comment-13720447
]
Huo Zhu commented on PIG-3394:
------------------------------
hi, [~dreambird]
the real situation is that i want to load a period of data in a macro like
following
{noformat}
a = load_period_data('$table', '$start_day', '$end_day')
{noformat}
so it's common to load one day through passing start_day and end_day the same
value
> pig parser complain same value passed to macro when expanding macro
> ---------------------------------------------------------------------
>
> Key: PIG-3394
> URL: https://issues.apache.org/jira/browse/PIG-3394
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.12
> Reporter: Huo Zhu
>
> [PIG_2247|https://issues.apache.org/jira/browse/PIG-2247] add the same
> arguments detecting before passed to macro, but cause the following problems
> {noformat}
> define simple_macro(in_relation, min_gpa, min_gpa) returns c {
> b = filter $in_relation by gpa >= $min_gpa;
> $c = foreach b generate age, name;}
> a = load 'sample.txt';
> b = simple_macro(a, 100, 100);
> {noformat}
> when launch in pig, it complain
> {noformat}
> ERROR org.apache.pig.Main - ERROR 1200: <file abc.pig.substituted, line 7>
> Cannot expand macro 'simple_macro'. Reason: Duplicated arguments names are
> passed in macro: number of arguments: 3 number of distinct arguments: 2
> {noformat}
--
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