Grokbase Groups Pig dev July 2011
FAQ
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

Search Discussions

  • Dmitriy V. Ryaboy (JIRA) at Jul 15, 2011 at 5:39 am
    [ 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
  • Dmitriy V. Ryaboy (JIRA) at Jul 15, 2011 at 5:39 am
    [ 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
  • Thejas M Nair (JIRA) at Jul 15, 2011 at 3:42 pm
    [ 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
  • Dmitriy V. Ryaboy (JIRA) at Jul 16, 2011 at 3:24 pm
    [ 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
  • Dmitriy V. Ryaboy (JIRA) at Jul 16, 2011 at 3:24 pm
    [ 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedJul 13, '11 at 9:12p
activeJul 16, '11 at 3:24p
posts6
users1
websitepig.apache.org

1 user in discussion

Dmitriy V. Ryaboy (JIRA): 6 posts

People

Translate

site design / logo © 2021 Grokbase