pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Coveney (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2600) Better Map support
Date Fri, 16 Mar 2012 06:25:41 GMT

    [ https://issues.apache.org/jira/browse/PIG-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230928#comment-13230928
] 

Jonathan Coveney commented on PIG-2600:
---------------------------------------

Hmm, I think there is a compelling argument to do so, but at the same time: do we want a bunch
of type specific conversion functions where one function can logically apply to multiple?
I mean, TOBAG can work on Tuples as well as Maps...theoretically, the Pig type system coupled
with the function should make it unambiguous which one is getting applied, and it'd be nice
not to have more UDFs than we need.
                
> Better Map support
> ------------------
>
>                 Key: PIG-2600
>                 URL: https://issues.apache.org/jira/browse/PIG-2600
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Jonathan Coveney
>             Fix For: 0.11
>
>
> It would be nice if Pig played better with Maps. To that end, I'd like to add a lot of
utility around Maps.
> - TOBAG should take a Map and output {(key, value)}
> - TOMAP should take a Bag in that same form and make a map.
> - KEYSET should return the set of keys.
> - VALUESET should return the set of values.
> - VALUELIST should return the List of values (no deduping).
> - INVERSEMAP would return a Map of values => the set of keys that refer to that Key
> This would all be pretty easy. A more substantial piece of work would be to make Pig
support non-String keys (this is especially an issue since UDFs and whatnot probably assume
that they are all Integers). Not sure if it is worth it.
> I'd love to hear other things that would be useful for people!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message