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

Jonathan Coveney commented on PIG-2641:
---------------------------------------

In response to #2, I agree that users will want to preserve the alias, thought 
IMHO the fact that tuples are ordered and json objects are not is a serious 
one. We can certainly maintain both, but it is going to lead to a more complex 
structure. Still, in my opinion, a proposal which does not maintain tuple order 
should be considered a bug (esp. if it currently does something different). 
Right now, Tuples are pretty much exclusively indexed based on numeric index, 
not on alias name. While it is certainly convenient to refer based on alias 
name, this goes against the pattern that has been promoted all along.

I'm very open to suggestions on how to deal with this (any other Pig comitters 
want to comment on whether or not they agree that this is an issue?). I mean, I 
would even be ok with having the tuple be an object but with an accompany list 
that gives the proper order of all of the entries. As long as it is possible to 
reconstruct it as it existed in Pig.
                
> Create toJSON function for all complex types: tuples, bags and maps
> -------------------------------------------------------------------
>
>                 Key: PIG-2641
>                 URL: https://issues.apache.org/jira/browse/PIG-2641
>             Project: Pig
>          Issue Type: New Feature
>          Components: piggybank
>    Affects Versions: 0.12
>         Environment: Foggy. Damn foggy.
>            Reporter: Russell Jurney
>            Assignee: Russell Jurney
>              Labels: chararray, fun, happy, input, json, output, pants, pig, 
> piggybank, string, wonderdog
>             Fix For: 0.12
>
>         Attachments: PIG-2641-2.patch, PIG-2641-3.patch, PIG-2641-4.patch, 
> PIG-2641.patch
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> It is a travesty that there are no UDFs in Piggybanks that, given an 
> arbitrary Pig datatype, return a JSON string of same. I intend to fix this 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to