You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Niels Basjes (JIRA)" <ji...@apache.org> on 2015/07/23 22:18:04 UTC

[jira] [Created] (PIG-4638) Allow TOMAP to accept dynamically sized input

Niels Basjes created PIG-4638:
---------------------------------

             Summary: Allow TOMAP to accept dynamically sized input 
                 Key: PIG-4638
                 URL: https://issues.apache.org/jira/browse/PIG-4638
             Project: Pig
          Issue Type: Improvement
    Affects Versions: 0.15.0
            Reporter: Niels Basjes
            Assignee: Niels Basjes
             Fix For: 0.16.0


Currently the TOMAP function only supports a parameter list of values.
Triggered by reading http://stackoverflow.com/q/17847970/ 
{quote}I want to convert a bag of tuples to a map with specific value in each tuple as key. Basically I want to change:
\{(id1, value1),(id2, value2), ...\} into \[id1#value1, id2#value2\]{quote}

I propose to make the TOMAP accept both the current form
{code}TOMAP($0, $1, $2, $3){code}
and a new form where the a single parameter: 
A bag of Tuples where each Tuple has exactly two fields: a "key" and a "value".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)