INVERSEMAP($0);
grunt dump b;
([2#{(1),(11)},apache#{(open)}])
([hadoop#{(apache),(12)},4#{(3)}])
/code
Olga, adding release notes. Let me know if you need more info.
Better Map support
--
Key: PIG-2600
URL: https
that were added as well as their
syntax and usage examples. This is for inclusion in the documentation, thanks!
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
? :)
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee: Prashant Kommireddi
should I be adding this?
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee
present in java files for each of the
UDFs. Lmk if it needs to go into release notes (and where) and I can put it
there.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
into the release notes. This way it is
much easier to created documentation patch.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
! Looking forward to seeing more
contribution :)
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan
the resolution status?
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee
[
https://issues.apache.org/jira/browse/PIG-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Coveney resolved PIG-2600.
---
Resolution: Fixed
Better Map support
--
Key: PIG-2600
comment and then I can commit: VALUESET seems
to be in 2space form instead of 4space form. My guess is you forgot to change
your IDE from the convention your use at work, or something like that. Fix that
and then we're good to go :)
Jon
Better Map support
. Seems like the
conventions are different there. Uploading a new patch.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
and unknown primitive (primitive
implies int etc), but just a wrong type in general.
That's it though. Should be good for committing after that.
Thanks for the work!
Better Map support
--
Key: PIG-2600
URL: https
.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee: Prashant Kommireddi
Fix
, dataBag);
105 } else {
106 bag.add(TUPLE_FACTORY.newTuple(entry.getKey()));
107 }
{code}
You can just reuse the bag reference instead of making a new dataBag
That should be the last of the comments...
Better Map support
?
Thanks again for your work on this. It is super close.
Jon
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter
? Either way, too early to be
thinking about optimization there :)
I will upload a patch soon with the changes, thanks for reviewing again.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
[
https://issues.apache.org/jira/browse/PIG-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prashant Kommireddi updated PIG-2600:
-
Attachment: PIG-2600_6.patch
Better Map support
patch uploaded.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee: Prashant
this, I'm a fan of the following to avoid
having to do containsKey and then a get right afterwards
{code}
DataBag bag = (DataBag)inverseMap.get(newKey);
if (bag==null) {
//logic
} else {
bad.add( ... //more logic)
}
{code}
Thanks again for the legwork on this.
Better Map
(changing return type to
bags). I have also added test cases for various primitive types being Map
values.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
[
https://issues.apache.org/jira/browse/PIG-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prashant Kommireddi reassigned PIG-2600:
Assignee: Prashant Kommireddi
Better Map support
.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee: Prashant Kommireddi
as well, we know the return type:
MapString,String (nothing else is really possibly).
For the tests on inversemap, probably worth testing the case of boolean values,
int, etc values.
Better Map support
--
Key: PIG-2600
URL
Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan Coveney
Assignee: Prashant Kommireddi
Fix
and INVERSEMAP. Added
corresponding test cases to TestBuiltin.java. Also added documentation for all
the new classes.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
:)
Another option on the inversmap only works on MapString,String front would
be that, if given MapString, T it converts T to a string, which I think
isn't a bad idea. Maybe that could be a constructor option, and the default is
an error.
Better Map support
statements. The 2nd case MapString, T
makes sense for primitive types, will upload a new patch soon.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue
}
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
Attachments: PIG
(as per hashmap put behavior)
{code}
grunt cat data;
[1#2,3#4,4#2]
[apache#hadoop,doug#hadoop]
grunt a = load 'data' as (M:[]);
grunt b = foreach a generate INVERSEMAP($0);
grunt dump b;
[4#3,2#4]
[hadoop#doug]
{code}
Better Map support
--
Key
and 2 MAPTOBAG and BAGTOMAP respectively,
since TOBAG, TOMAP exist already. In fact, all UDFs here (except INVERSEMAP)
could be prefixed with MAP to avoid confusion.
Better Map support
--
Key: PIG-2600
URL: https
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
existing UDFs and not create
type-specific ones.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
Issue Type: Improvement
Reporter: Jonathan
these with Maps or Bags, realize
they can't and then write a MapToBag UDF.
Do you think INVERSEMAP is something that people need often? I question the
general usefulness of that one.
Better Map support
--
Key: PIG-2600
URL: https
to me, for eg to get
field-index map from index-field. I see it being useful in few cases with
click-through analysis as well.
Again, not a super required use-case but good to have.
Better Map support
--
Key: PIG-2600
URL: https
see that looking?
As far as inversemap... most of the stuff we've talked about thus far is pretty
easy to implement. I'm trying to think of if there is anything more ambitious?
Better Map support
--
Key: PIG-2600
URL: https
to have more eyes
look at it and comment. I have a test case for KEYSET and will be working on
tests for others soon.
Better Map support
--
Key: PIG-2600
URL: https://issues.apache.org/jira/browse/PIG-2600
Project: Pig
, 2012 at 5:47 PM, Jonathan Coveney jcove...@gmail.comwrote:
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
a
JIRA against this.
Thanks,
Prashant
On Wed, Feb 29, 2012 at 5:47 PM, Jonathan Coveney jcove...@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
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
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 jcove...@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
40 matches
Mail list logo