You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Julien Le Dem (JIRA)" <ji...@apache.org> on 2010/07/01 23:06:49 UTC

[jira] Commented: (PIG-1471) inline UDFs in scripting languages

    [ https://issues.apache.org/jira/browse/PIG-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884422#action_12884422 ] 

Julien Le Dem commented on PIG-1471:
------------------------------------

If the function definition is inline in a DEFINE statement then the @outputSchema decorator is not that usefull anymore. 
Also the current syntax already enables doing something similar:

{code}
DEFINE hellopig org.apache.pig.scripting.jython.JythonFunction('def helloworld():\n\treturn (\'Hello, World\')', 'x:{t:(word:chararray)}');
{code}

so I'm not sure extending the syntax is necessary unless it let the user type UDFs without escaping (\n \` ...)
Something like:

{code}
DEFINE hellopig USING org.apache.pig.scripting.jython.JythonScriptEngine('x:{t:(word:chararray)}') AS
 
def helloworld():
    return ('Hello, World')';

ENDDEFINE
{code}

> inline UDFs in scripting languages
> ----------------------------------
>
>                 Key: PIG-1471
>                 URL: https://issues.apache.org/jira/browse/PIG-1471
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Aniket Mokashi
>            Assignee: Aniket Mokashi
>             Fix For: 0.8.0
>
>
> 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. It should be possible to write these scripts inline as part of pig scripts. This feature is an extension of https://issues.apache.org/jira/browse/PIG-928

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.