hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Le Dem (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1471) inline UDFs in scripting languages
Date Thu, 01 Jul 2010 21:06:49 GMT

    [ 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:

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

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

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


> 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.

View raw message