You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Erik Selin (JIRA)" <ji...@apache.org> on 2014/01/02 21:13:50 UTC

[jira] [Commented] (PIG-3615) Update the way that JsonLoader/JsonStorage deal with BigDecimal

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

Erik Selin commented on PIG-3615:
---------------------------------

Could someone take a look at this tiny little pr. It would be great to get it merged or at least have a discussion about it :)

> Update the way that JsonLoader/JsonStorage deal with BigDecimal
> ---------------------------------------------------------------
>
>                 Key: PIG-3615
>                 URL: https://issues.apache.org/jira/browse/PIG-3615
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.12.0
>            Reporter: Erik Selin
>            Priority: Minor
>         Attachments: bugPig-3615.patch
>
>
> It's a common (and good) convention to quote fixed point numbers when storing them as json. The reason being that majority of json libraries will implicitly load any number value as a floating point number and if you care about data integrity this will make you very sad.
> This update makes JsonLoader able to load BigDecimal values from quoted values (the old jackson library that we're using doesn't support this through the current approach) as well as making JsonStorage store BigDecimal values as quoted strings.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)