[ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173871#comment-13173871 ]
Jonathan Coveney commented on PIG-2430: --------------------------------------- I agree that this experience should definitely inform the new EvalFunc design. I added a new comment As far as this patch, I added your case to TestUDF, and took it into account. There is a part of LogicalPlanBuilder.java's buildUDF that is only called if there was no define statement for the alias in question. Thus, I added a field to UserFuncExpression which holds true if it was created via a define, and false otherwise. Thus, if you were to do... {code} define my myudf('val'); a = load ... b = foreach a generate my($0), myudf($0); {code} In this case, the my would have any FuncSpec values overriden by the define statement, but myudf would not, since it was not via an alias. Let me know if this seems like an appropriate way to do this! > 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, > PIG2430_2.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