[
https://issues.apache.org/jira/browse/PIG-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886163#action_12886163
]
Aniket Mokashi commented on PIG-928:
------------------------------------
I got what you mean, if user needs a generic square function he can write:
{code}
#!/usr/bin/python
@outputSchemaFunction(\"squareSchema\")
def square(number):
return (number * number)
def squareSchema(input):
return input
{code}
I will make changes so that I can use similar approach as pig-greek. Since
outputschema needs to know both input and name of outputSchemaFunction current
code would need further changes.
> UDFs in scripting languages
> ---------------------------
>
> Key: PIG-928
> URL: https://issues.apache.org/jira/browse/PIG-928
> Project: Pig
> Issue Type: New Feature
> Reporter: Alan Gates
> Assignee: Aniket Mokashi
> Fix For: 0.8.0
>
> Attachments: calltrace.png, package.zip, PIG-928.patch,
> pig-greek.tgz, pig.scripting.patch.arnab, pyg.tgz, RegisterPythonUDF2.patch,
> RegisterPythonUDF3.patch, RegisterPythonUDF4.patch,
> RegisterPythonUDFFinale.patch, RegisterPythonUDFFinale3.patch,
> RegisterScriptUDFDefineParse.patch, scripting.tgz, scripting.tgz, test.zip
>
>
> It should be possible to write UDFs in scripting languages such as python,
> ruby, etc. This frees users from needing to compile Java, generate a jar,
> etc. It also opens Pig to programmers who prefer scripting languages over
> Java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.