You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Aniket Mokashi (JIRA)" <ji...@apache.org> on 2010/06/28 23:57:51 UTC

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

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.


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

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-1471:
--------------------------------

    Fix Version/s:     (was: 0.8.0)

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


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

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885652#action_12885652 ] 

Daniel Dai commented on PIG-1471:
---------------------------------

Yes, Jython works because of JythonFunction has the ability to do the inline function. Here we want a general and consistent solution for UDF in other languages to define an inline UDF.

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


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

Posted by "Aniket Mokashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883327#action_12883327 ] 

Aniket Mokashi commented on PIG-1471:
-------------------------------------

The proposed syntax is
{code}
define hellopig using org.apache.pig.scripting.jython.JythonScriptEngine as '@outputSchema("x:{t:(word:chararray)}")\ndef helloworld():\n\treturn ('Hello, World')';
{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.


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

Posted by "Julien Le Dem (JIRA)" <ji...@apache.org>.
    [ 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.