IBMStreams / streamsx.json

Toolkit for working with JSON in SPL applications.
http://ibmstreams.github.io/streamsx.json/
Other
3 stars 19 forks source link

Decimal type is handled literally (no cast from double). #91

Closed leongor closed 6 years ago

leongor commented 7 years ago
  1. Decimal type is handled literally (no cast from double).
  2. Regression fix for status handling.
markheger commented 6 years ago

@leongor Could you please describe the changed behaviour in operator description, e.g. SPL decimals types are not converted from double and taken as string.

leongor commented 6 years ago

RapidJSON doesn't support natively parsing high precision decimal values. The first solution was to parse them as double, then cast to decimal - such approach can loose precision or distort the number. The current solution is to parse the JSON value as a string, then to cast it using spl_cast to decimal.

schubon commented 6 years ago

Hi @leongor , have you added your explanation to the operator description, too, and simply forgotten to push your changes? Kind regards Norbert

leongor commented 6 years ago

Sorry @shulz2, did not get your question. It's about native function implementation, why should it be in operator description?

schubon commented 6 years ago

Hi @leongor, no need to be sorry, the error is on my side. Just saw Mark's request and your answer w/o an accompanying documentation change, so I assumed you forgot to deliver something. Sorry for that ... Kind regards Norbert