Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.15.0
-
None
-
None
-
Reviewed
-
The TOMAP function now also accepts a bag of key-value pairs as input.
Description
Currently the TOMAP function only supports a parameter list of values.
Triggered by reading http://stackoverflow.com/q/17847970/
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]
I propose to make the TOMAP accept both the current form
TOMAP($0, $1, $2, $3)
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".
Attachments
Attachments
Issue Links
- requires
-
PIG-4405 Adding 'map[]' support to mock/Storage
- Closed