-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.4.0-incubating
-
Component/s: None
-
Labels:None
-
Flags:Patch
When sending for example
{"type":"NUMBER","value":"333.333"}
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.