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:37:04 UTC
[jira] [Updated] (PIG-4638) Allow TOMAP to accept dynamically sized
input
[ https://issues.apache.org/jira/browse/PIG-4638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niels Basjes updated PIG-4638:
------------------------------
Attachment: PIG-4638-20150723.patch
Please review the attached patch.
NOTE: The unit tests require the patch I attached with PIG-4405 to be present.
> 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
>
> Attachments: PIG-4638-20150723.patch
>
>
> 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)