Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.0
-
None
-
None
-
Reviewed
Description
It looks like the macro functionality doesnt support for positional references. The below is an example script;
----------------------------------------------------------------------------
DEFINE my_macro (X,key) returns Y
A = load 'sometext' using TextLoader() as (row1) ;
E = my_macro(A,A.$0);
dump E;
----------------------------------------------------------------------------
This script execution fails at parsing staging itself;
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. <file try1.pig, line 16,
column 16> mismatched input '.' expecting RIGHT_PAREN
If i replace A.$0 with the field name ie row1 the script runs fine.