Status: Resolved (View Workflow)
Resolution: Partially Completed
Problem 1: The parser defaults to parsing literals that look like bigdecimal as doubles, which have no scale.
Workaround (which is on devcentral): You can avoid the above conversions by wrapping the values in a convert in the query (example: "convert('123.00', BigDecimal )").
A better fix is update the parser to look for loss of scale information and to use the bigdecimal type instead.
Problem 2: default division behavior
Problem 3: No explicit control via the parser
It would be good to provide explicit precision and scale via "convert(xxx, BigDecimal(10, 2))" - side note bigdecimal is a bad name for this type. it should really just be decimal
Reference: This is related to Issue Tracker Issue 175485.
|Precision of BigInteger and BigDecimal need to be limited||Closed||Unassigned|