[
https://issues.apache.org/jira/browse/PIG-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556402#comment-13556402
]
Alan Gates commented on PIG-3121:
---------------------------------
My concern is what you brought up, the problem here isn't JsonStorage.
One other option I'd like to point out is that you could extend JsonStorage
with a new class CasterJsonStorage. The only method it would implement would
be putNext. In that method it could do the casts and then call
super.putNext(). This is hopefully light weight enough from your viewpoint and
avoids pushing one of features into JsonStorage.
> Optionally convert long to chararray in JsonStorage
> ---------------------------------------------------
>
> Key: PIG-3121
> URL: https://issues.apache.org/jira/browse/PIG-3121
> Project: Pig
> Issue Type: Improvement
> Affects Versions: 0.10.0
> Reporter: Josh Levy
>
> I work with a data set that uses random longs (64 bit integers) as
> identifiers. Recently I've been accessing the data from Pig and using
> JsonStorage to save records, that I then run through another script to get
> JSON that I can feed into other tools. One of the tools I use is broken in
> the sense that it treats all numbers as 64 bit floating point, and it can't
> faithfully reproduce most of the identifiers I pass it. My work around is to
> convert the identifiers to strings before they get to that tool.
> If I provide a patch, is there interest in adding an option to JsonStorage
> that tells it to serialize all longs as if they are strings?
--
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