Lucy Cunningham created PIG-2969:
------------------------------------
Summary: 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