[
https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thejas M Nair updated PIG-2430:
-------------------------------
Attachment: DummySize.patch
{code}
grunt> define SZ SIZE('10');
grunt> l = load 't.txt' as (a,b);
grunt> f = foreach l generate SZ(a);
grunt> dump f;
{code}
I have attached a patch with a change to size udf to return a dummy size value
passed in the constructor. (the change is just meant to demonstrate the issue)
With the change proposed in PIG2430_1.patch, the constructor argument does not
get set. Without the PIG2430_1.patch, the SZ(a) call will return 10, with it
returns 0.
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with
> constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: PIG-2430
> URL: https://issues.apache.org/jira/browse/PIG-2430
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.0, 0.10, 0.11
> Reporter: Jonathan Coveney
> Assignee: Jonathan Coveney
> Fix For: 0.9.0, 0.10, 0.11
>
> Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify
> constructor arguments, those arguments are currently ignored. Thankfully,
> there is a one line fix (it's funny that this has never been run into before,
> but is an). Patch with tests incoming. I assume that this affects 0.10 and
> 0.9 but haven't tested, I was just working with trunk.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira