Details
-
Bug
-
Status: Resolved
-
Urgent
-
Resolution: Fixed
-
None
Description
Currently, in DecimalSerializer.toString(value), it uses BigDecimal.toPlainString() which generates huge string for large scale values.
BigDecimal d = new BigDecimal("1e-" + (Integer.MAX_VALUE - 6)); d.toPlainString(); // oom
Propose to use BigDecimal.toString() when scale is larger than 100 which is configurable via -Dcassandra.decimal.maxscaleforstring
The code should apply cleanly to 3.0+.