Details
Description
With
macro.pig
DEFINE mygroupby(REL, key) RETURNS G { %declare number 333; $G = GROUP $REL by $key parallel $number; };
and
test.pig
-- equivalent of -param number=111 %declare number 111; IMPORT 'macro.pig'; data = LOAD '1234.txt' USING PigStorage() AS (i: int); result = mygroupby(data, i); STORE result INTO 'test.out' USING PigStorage();
Fails with
error msg: <file myscript.pig, line 4> Macro inline failed for macro 'mygroupby'. Reason: null
Similarly, when macro param and command-line param overlap, it fails with
Macro inline failed for macro 'mygroupby'. Reason: Macro contains argument or return value number which conflicts with a Pig parameter of the same name.
Attachments
Attachments
Issue Links
- is related to
-
PIG-3359 Register Statements and Param Substitution in Macros
- Closed