glorp icon indicating copy to clipboard operation
glorp copied to clipboard

DatabasePlatform>>#convertToNumber:for: contains a bug

Open ironirc opened this issue 3 years ago • 0 comments

I think DatabasePlatform>>#convertToNumber:for: contains a bug, Dialect doesPrecisionOf: aNumber equal: aType precision should be: Dialect doesPrecisionOf: aNumber equal: aType scale. If you take a look at Dialect class>>#doesPrecisionOf:equal: you can see that terminology has been mixed up (if I'm interpreting it right)

    ^aNumber class == self fixedPointClass and: [aNumber scale = aPrecision]```
method and argument name suggests that precision is being checked, but actually it's the scale that's being compared.

ironirc avatar Aug 04 '22 13:08 ironirc