You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Jonathan Coveney <jc...@gmail.com> on 2012/03/01 02:47:42 UTC

Better map support?

Hey all! In the last couple of weeks I've found myself wanting for better
map support in pig. I'd be willing to do the work, just wanted to get a
sense of what people thought might be useful. And maybe some of this exists!

TOBAG - given a Map, outputs {(key,value)}
KEYSET - returns {(key)} where it is unique
VALUESET - returns {(value)} where it is unique
CONCAT - takes some number of Maps, and merges them together. The first
one's values will override the rest. Or the latest one will. Whatevs.

Not sure what else would be useful. I'm including user@ on this because I'd
love to hear any map manipulation features you crave. Maps, up to know,
have been pretty 2nd class and I'd love to help change that.

Jon

Re: Better map support?

Posted by Prashant Kommireddi <pr...@gmail.com>.
Typo, sorry. I should refrain from emailing past 10pm (but Open Source
would never be possible for me in that case :)

Yes, VALUELIST is a good to have feature. Please, if you could, add me to
the watch list once you have JIRA up.

Thanks,
Prashant

On Thu, Mar 15, 2012 at 10:36 PM, Jonathan Coveney <jc...@gmail.com>wrote:

> Sweet. I don't have a JIRA, because I wanted to flesh out the functionality
> that people found useful.
>
> KEYLIST doesn't make a ton of set, as Maps keys are already
> distinct...VALUESET and VALUELIST totally make sense though. We should
> probably make a JIRA and brainstorm there. Will do that shortly.
>
> 2012/3/15 Prashant Kommireddi <pr...@gmail.com>
>
> > Hi Jon,
> >
> > I think an "INVERSE_MAP" would be a good use case. Also, instead of (or
> in
> > addition to) KEYSET we should have KEYLIST which does not  eliminate
> > duplicate values.
> >
> > I would like to help on this if needed, please let me know if you have a
> > JIRA against this.
> >
> > Thanks,
> > Prashant
> >
> > On Wed, Feb 29, 2012 at 5:47 PM, Jonathan Coveney <jcoveney@gmail.com
> > >wrote:
> >
> > > Hey all! In the last couple of weeks I've found myself wanting for
> better
> > > map support in pig. I'd be willing to do the work, just wanted to get a
> > > sense of what people thought might be useful. And maybe some of this
> > > exists!
> > >
> > > TOBAG - given a Map, outputs {(key,value)}
> > > KEYSET - returns {(key)} where it is unique
> > > VALUESET - returns {(value)} where it is unique
> > > CONCAT - takes some number of Maps, and merges them together. The first
> > > one's values will override the rest. Or the latest one will. Whatevs.
> > >
> > > Not sure what else would be useful. I'm including user@ on this
> because
> > > I'd
> > > love to hear any map manipulation features you crave. Maps, up to know,
> > > have been pretty 2nd class and I'd love to help change that.
> > >
> > > Jon
> > >
> >
>

Re: Better map support?

Posted by Jonathan Coveney <jc...@gmail.com>.
Sweet. I don't have a JIRA, because I wanted to flesh out the functionality
that people found useful.

KEYLIST doesn't make a ton of set, as Maps keys are already
distinct...VALUESET and VALUELIST totally make sense though. We should
probably make a JIRA and brainstorm there. Will do that shortly.

2012/3/15 Prashant Kommireddi <pr...@gmail.com>

> Hi Jon,
>
> I think an "INVERSE_MAP" would be a good use case. Also, instead of (or in
> addition to) KEYSET we should have KEYLIST which does not  eliminate
> duplicate values.
>
> I would like to help on this if needed, please let me know if you have a
> JIRA against this.
>
> Thanks,
> Prashant
>
> On Wed, Feb 29, 2012 at 5:47 PM, Jonathan Coveney <jcoveney@gmail.com
> >wrote:
>
> > Hey all! In the last couple of weeks I've found myself wanting for better
> > map support in pig. I'd be willing to do the work, just wanted to get a
> > sense of what people thought might be useful. And maybe some of this
> > exists!
> >
> > TOBAG - given a Map, outputs {(key,value)}
> > KEYSET - returns {(key)} where it is unique
> > VALUESET - returns {(value)} where it is unique
> > CONCAT - takes some number of Maps, and merges them together. The first
> > one's values will override the rest. Or the latest one will. Whatevs.
> >
> > Not sure what else would be useful. I'm including user@ on this because
> > I'd
> > love to hear any map manipulation features you crave. Maps, up to know,
> > have been pretty 2nd class and I'd love to help change that.
> >
> > Jon
> >
>

Re: Better map support?

Posted by Prashant Kommireddi <pr...@gmail.com>.
Hi Jon,

I think an "INVERSE_MAP" would be a good use case. Also, instead of (or in
addition to) KEYSET we should have KEYLIST which does not  eliminate
duplicate values.

I would like to help on this if needed, please let me know if you have a
JIRA against this.

Thanks,
Prashant

On Wed, Feb 29, 2012 at 5:47 PM, Jonathan Coveney <jc...@gmail.com>wrote:

> Hey all! In the last couple of weeks I've found myself wanting for better
> map support in pig. I'd be willing to do the work, just wanted to get a
> sense of what people thought might be useful. And maybe some of this
> exists!
>
> TOBAG - given a Map, outputs {(key,value)}
> KEYSET - returns {(key)} where it is unique
> VALUESET - returns {(value)} where it is unique
> CONCAT - takes some number of Maps, and merges them together. The first
> one's values will override the rest. Or the latest one will. Whatevs.
>
> Not sure what else would be useful. I'm including user@ on this because
> I'd
> love to hear any map manipulation features you crave. Maps, up to know,
> have been pretty 2nd class and I'd love to help change that.
>
> Jon
>

Re: Better map support?

Posted by Prashant Kommireddi <pr...@gmail.com>.
Hi Jon,

I think an "INVERSE_MAP" would be a good use case. Also, instead of (or in
addition to) KEYSET we should have KEYLIST which does not  eliminate
duplicate values.

I would like to help on this if needed, please let me know if you have a
JIRA against this.

Thanks,
Prashant

On Wed, Feb 29, 2012 at 5:47 PM, Jonathan Coveney <jc...@gmail.com>wrote:

> Hey all! In the last couple of weeks I've found myself wanting for better
> map support in pig. I'd be willing to do the work, just wanted to get a
> sense of what people thought might be useful. And maybe some of this
> exists!
>
> TOBAG - given a Map, outputs {(key,value)}
> KEYSET - returns {(key)} where it is unique
> VALUESET - returns {(value)} where it is unique
> CONCAT - takes some number of Maps, and merges them together. The first
> one's values will override the rest. Or the latest one will. Whatevs.
>
> Not sure what else would be useful. I'm including user@ on this because
> I'd
> love to hear any map manipulation features you crave. Maps, up to know,
> have been pretty 2nd class and I'd love to help change that.
>
> Jon
>