You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Dmitriy V. Ryaboy (JIRA)" <ji...@apache.org> on 2011/07/13 23:11:59 UTC

[jira] [Created] (PIG-2161) TOTUPLE should use no-copy tuple creation

TOTUPLE should use no-copy tuple creation
-----------------------------------------

                 Key: PIG-2161
                 URL: https://issues.apache.org/jira/browse/PIG-2161
             Project: Pig
          Issue Type: Improvement
            Reporter: Dmitriy V. Ryaboy
            Assignee: Dmitriy V. Ryaboy
            Priority: Trivial


TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.

Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (PIG-2161) TOTUPLE should use no-copy tuple creation

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

Dmitriy V. Ryaboy closed PIG-2161.
----------------------------------


> TOTUPLE should use no-copy tuple creation
> -----------------------------------------
>
>                 Key: PIG-2161
>                 URL: https://issues.apache.org/jira/browse/PIG-2161
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Trivial
>             Fix For: 0.10
>
>         Attachments: pig_2161.patch
>
>
> TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.
> Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2161) TOTUPLE should use no-copy tuple creation

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

Dmitriy V. Ryaboy updated PIG-2161:
-----------------------------------

    Status: Patch Available  (was: Open)

> TOTUPLE should use no-copy tuple creation
> -----------------------------------------
>
>                 Key: PIG-2161
>                 URL: https://issues.apache.org/jira/browse/PIG-2161
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Trivial
>         Attachments: pig_2161.patch
>
>
> TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.
> Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2161) TOTUPLE should use no-copy tuple creation

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066016#comment-13066016 ] 

Thejas M Nair commented on PIG-2161:
------------------------------------

+1. I don't see a reason why the tuple should be copied.

> TOTUPLE should use no-copy tuple creation
> -----------------------------------------
>
>                 Key: PIG-2161
>                 URL: https://issues.apache.org/jira/browse/PIG-2161
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Trivial
>         Attachments: pig_2161.patch
>
>
> TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.
> Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2161) TOTUPLE should use no-copy tuple creation

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

Dmitriy V. Ryaboy updated PIG-2161:
-----------------------------------

    Attachment: pig_2161.patch

Attaching a trivial fix.

It's worth noting there was an explicit test for returning a different tuple than the input (but having that new tuple contain the same data as the old tuple).  I don't understand why. Is this dangerous? I couldn't find a mention in any of the jiras related to TOTUPLE.

> TOTUPLE should use no-copy tuple creation
> -----------------------------------------
>
>                 Key: PIG-2161
>                 URL: https://issues.apache.org/jira/browse/PIG-2161
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Trivial
>         Attachments: pig_2161.patch
>
>
> TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.
> Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2161) TOTUPLE should use no-copy tuple creation

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

Dmitriy V. Ryaboy updated PIG-2161:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.10
           Status: Resolved  (was: Patch Available)

Committed to trunk.

> TOTUPLE should use no-copy tuple creation
> -----------------------------------------
>
>                 Key: PIG-2161
>                 URL: https://issues.apache.org/jira/browse/PIG-2161
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Trivial
>             Fix For: 0.10
>
>         Attachments: pig_2161.patch
>
>
> TOTUPLE udf gets an input tuple, creates a new list, puts every field from the tuple into the list, and creates a new tuple by calling TupleFactory.newTuple(List<Object>) method -- which in turn allocates *another* list and copies everything in there.
> Simply returning the input tuple should be sufficient -- Pig already did the work of putting the arguments into a tuple.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira