[ https://issues.apache.org/jira/browse/PIG-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837627#action_12837627 ]
hc busy commented on PIG-1016: ------------------------------ As I mentioned, all I ask is for the functionality of the comparator to be fixed as specified in the patch attached to a subtask of this ticket (PIG-1082) I understand that everyone is reiterating that value of a map is a bytearray, but why put this artificial restriction on the system? Especially since back in 0.3 when I filed this ticket, all pig documentation had said that value of map can be anything. Why backtrack on something simple like this when there is no need to? .... actually, looking at your example above, I'm not sure I understand this casting convetion that you've implemented {code} B= foreach A generate (int)(data#'a'), (chararray)(data#'b'),(tuple(map[]))(data#'c'); {code} so, that last cast is a tuple of maps from 'c'? but int he result it's just a tuple of numbers bq. (1,'a',(1,2,3)) I have no fundamental problem with being able to cast in a separate step and being able to order, join, and group by them, as long as all of those work. But say I have a 4-level-trie implemented as a nested map, in order to look something up, I would have to type out four separate aliases, re-casting 4 times, as opposed to being able to read the data in once (with custom readers) and resolve it on all on one line. Looking at the bigger picture, and considering some of the other areas of pig development, what I say is not an unlikely situation. And there are other people on the pig-user list asking for this feature. But I do want to emphasize, I don't mean to diminish the importance of PIG-613 in anyway, I actually tried doing that when I filed this ticket. I just wasn't smart enough to figure that was also a problem... I just think this is also a problem. > Reading in map data seems broken > -------------------------------- > > Key: PIG-1016 > URL: https://issues.apache.org/jira/browse/PIG-1016 > Project: Pig > Issue Type: Improvement > Components: data > Affects Versions: 0.4.0 > Reporter: hc busy > Attachments: PIG-1016.patch > > > Hi, I'm trying to load a map that has a tuple for value. The read fails in > 0.4.0 because of a misconfiguration in the parser. Where as in almost all > documentation it is stated that value of the map can be any time. > I've attached a patch that allows us to read in complex objects as value as > documented. I've done simple verification of loading in maps with tuple/map > values and writing them back out using LOAD and STORE. All seems to work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.