Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
As discussed today, we have agreed to try following the same mechanism as Apache Avro: https://avro.apache.org/docs/1.8.1/spec.html#Decimal We will use a fixed scale of 6 for the mantissa. 8 was considered but is only applicable for Japanese Yen and we have no use case for that at present. For example: TODO |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Until now, the example apps have used Double for all floating point types. However I believe that we need to offer something with more precision (similar to Java BigDecimal) for Prices and Notional amounts in particular.
I see a few options here:
Add support for a Decimal type, directly backed by a Java BigDecimal in the Data table. There are fewer options to move these into off heap memory though (future enhancement)
Add support for a Decimal type, backed by a Long. The Long would need to be divided by 10^X to convert to decimal format on the UI for display and multiplied back for filtering / RPC. Another downside is we are limiting ourselves to a max Integer value based on how many decimal places we offer. Upside is that we already support Long.
Write our own impl of BigDecimal as a Record of two Longs, one for the Integer and one for the mantissa.
Alternatively, we just live with Doubles.
Beta Was this translation helpful? Give feedback.
All reactions