You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2010/08/28 02:37:54 UTC

[jira] Created: (PIG-1577) support to variable number of arguments in UDF

support to variable number of arguments in UDF
----------------------------------------------

                 Key: PIG-1577
                 URL: https://issues.apache.org/jira/browse/PIG-1577
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.6.0
            Reporter: Olga Natkovich
             Fix For: 0.9.0


In the current implementation, functionality that allows to map arguments to classes does not support functions with variable number of arguments. Also it does not support funtions that can have variable (but fixed in number) number of arguments. 

This causes problems for string UDFs such as CONCAT that can take an arbitrary number of arguments or TRIM that can take 1,2, or 3 arguments

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


[jira] Commented: (PIG-1577) support to variable number of arguments in UDF

Posted by "David Ciemiewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921741#action_12921741 ] 

David Ciemiewicz commented on PIG-1577:
---------------------------------------

Olga, can you clarify the issue?

I've been writing and using UDFs with multiple parameters for years so there must be some subtlety that is escaping me in this JIRA problem description.

Thanks.

> support to variable number of arguments in UDF
> ----------------------------------------------
>
>                 Key: PIG-1577
>                 URL: https://issues.apache.org/jira/browse/PIG-1577
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Olga Natkovich
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>
> In the current implementation, functionality that allows to map arguments to classes does not support functions with variable number of arguments. Also it does not support funtions that can have variable (but fixed in number) number of arguments. 
> This causes problems for string UDFs such as CONCAT that can take an arbitrary number of arguments or TRIM that can take 1,2, or 3 arguments

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


[jira] Assigned: (PIG-1577) support to variable number of arguments in UDF

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

Alan Gates reassigned PIG-1577:
-------------------------------

    Assignee: Daniel Dai

> support to variable number of arguments in UDF
> ----------------------------------------------
>
>                 Key: PIG-1577
>                 URL: https://issues.apache.org/jira/browse/PIG-1577
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Olga Natkovich
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>
> In the current implementation, functionality that allows to map arguments to classes does not support functions with variable number of arguments. Also it does not support funtions that can have variable (but fixed in number) number of arguments. 
> This causes problems for string UDFs such as CONCAT that can take an arbitrary number of arguments or TRIM that can take 1,2, or 3 arguments

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


[jira] Commented: (PIG-1577) support to variable number of arguments in UDF

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922228#action_12922228 ] 

Olga Natkovich commented on PIG-1577:
-------------------------------------

The issue is that if your function takes sometimes two and sometimes three parameters and has getArgToFuncMapping it is likely to result in an error. If you don't use getArgToFuncMapping things work just fine

> support to variable number of arguments in UDF
> ----------------------------------------------
>
>                 Key: PIG-1577
>                 URL: https://issues.apache.org/jira/browse/PIG-1577
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Olga Natkovich
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>
> In the current implementation, functionality that allows to map arguments to classes does not support functions with variable number of arguments. Also it does not support funtions that can have variable (but fixed in number) number of arguments. 
> This causes problems for string UDFs such as CONCAT that can take an arbitrary number of arguments or TRIM that can take 1,2, or 3 arguments

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


[jira] Commented: (PIG-1577) support to variable number of arguments in UDF

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

Daniel Dai commented on PIG-1577:
---------------------------------

The issue in this Jira is that Pig has no ability to declare input schema of the UDF with variable number of arguments (in getArgToFuncMapping). You can interpret input tuple arbitrarily and use that for variable number of arguments. But with getArgToFuncMapping, you can get UDF signature matching and early input schema checking.

> support to variable number of arguments in UDF
> ----------------------------------------------
>
>                 Key: PIG-1577
>                 URL: https://issues.apache.org/jira/browse/PIG-1577
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Olga Natkovich
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>
> In the current implementation, functionality that allows to map arguments to classes does not support functions with variable number of arguments. Also it does not support funtions that can have variable (but fixed in number) number of arguments. 
> This causes problems for string UDFs such as CONCAT that can take an arbitrary number of arguments or TRIM that can take 1,2, or 3 arguments

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