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

Eyal Allweil commented on PIG-3615:
-----------------------------------

Are you sure? I am looking at 
https://github.com/apache/pig/commit/c504c60140400bb497fb4681008f038c47f2cd27

There I see the change to JsonStorage.java, which isn't in my patch - this one:

 case DataType.BIGDECIMAL:
- json.writeNumberField(field.getName(), (BigDecimal)d);
+ json.writeStringField(field.getName(), d.toString());


> 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
>            Assignee: Erik Selin
>            Priority: Minor
>             Fix For: 0.15.0
>
>         Attachments: PIG-3615.patch, 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.3.4#6332)

Reply via email to