[ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172925#comment-13172925 ]
Jonathan Coveney commented on PIG-2430: --------------------------------------- Thejas, thanks again for taking a look. I see what you mean now. I think there are a couple of resolutions to this, the question comes down to: in the case of an explicit define statement, but where there is also a matching getArgToFuncMapping, which should take precedence? For an explicit parameter (ie you dummy sIZE example), it seems pretty clear that the user defined parameter should take precedence. With no parameter it is less clear...there are 2 reasons why people would use a define statement. 1) to explicitly define a constructor parameter (or intentionally 0 constructor parameters) 2) to be able to refer to a UDF by an alias (in which case, the argument by the getArgToFuncMapping may be appropriate) This ambiguity could be why this argument was ignored in the first place, but given it's there, I think it could be useful in UDFs, we just have to be clear on the semantics. > 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