[ 
https://issues.apache.org/jira/browse/CALCITE-795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-795.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.0-incubating

Fixed in 
http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/efecdade.

Thanks for the patch, Lukas!

> Loss of precision when sending a decimal number via the remote JSON service
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-795
>                 URL: https://issues.apache.org/jira/browse/CALCITE-795
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Lukas Lalinsky
>            Assignee: Julian Hyde
>             Fix For: 1.4.0-incubating
>
>
> When sending for example {code}{"type":"NUMBER","value":"333.333"}{code} to 
> the "fetch" request of the remote JSON service, the exact value will not be 
> kept and after one UPSERT/SELECT roundtrip in Phoenix I will get 333.332 back.
> Interestingly enough, this worked in Calcite 1.2 before the TypedValue class 
> was introduced, but I think that was working just by accident.
> The attached patch changes the Jackson object mapper to decode any JSON float 
> to BigDecimal, unless the code explicitly asks for Float/Double. I think that 
> shouldn't break anything and it solves this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to