pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucy Cunningham (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PIG-2969) Can't get simple macro with two return values to work
Date Wed, 24 Oct 2012 21:28:15 GMT

     [ https://issues.apache.org/jira/browse/PIG-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lucy Cunningham resolved PIG-2969.
----------------------------------

    Resolution: Not A Problem

Seems to be an issue with the documentation - removing curly brackets around the returns aliases
works fine.
                
> Can't get simple macro with two return values to work
> -----------------------------------------------------
>
>                 Key: PIG-2969
>                 URL: https://issues.apache.org/jira/browse/PIG-2969
>             Project: Pig
>          Issue Type: Bug
>          Components: piggybank
>    Affects Versions: 0.11
>            Reporter: Lucy Cunningham
>
> Hi, I followed the documentation to try and write a pig macro with two output relations,
but i'm getting errors:
> define mymacro (a, b)
> returns {c, d} {
>     $c = $a;
>     $d = $b;
> };
> e = load 'thing' as (x:int);
> f = load 'thing' as (x:int);
> g,h = mymacro(e,f);
> dump g;
> dump h;
> ~                                                                                   
                                                                                         
                                                  
> ~                  
> Gives me error: 
> ERROR 2999: Unexpected internal error. Undefined parameter : c
> java.lang.RuntimeException: Undefined parameter : c
>         at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:232)
>         at org.apache.pig.tools.parameters.PigFileParser.input(PigFileParser.java:65)
>         at org.apache.pig.tools.parameters.PigFileParser.Parse(PigFileParser.java:43)
>         at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:105)
>         at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:98)
>         at org.apache.pig.Main.runParamPreprocessor(Main.java:778)
>         at org.apache.pig.Main.run(Main.java:568)
>         at org.apache.pig.Main.main(Main.java:154)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:186)
> Is this something that I am doing wrong or is there a bug?
> Thanks!
> Lucy

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