OK, thanks, so, conclusion:
- This only happens in quite specific circumstances (selecting numeric literals, it seems) where for some reason Oracle is unable to assign a proper type to the literal, and it reports the scale as -127. It does not appear to occur when just selecting columns.
- This tripped up our workaround for a different bug where Oracle never correctly reports the type of FLOAT/ DOUBLE PRECISION columns. We were using a scale of -127 to detect the FLOAT type, since Oracle always incorrectly reports it as NUMBER. But this turns out to be fragile (no surprise).
- And, so, in cases of types with more than 15 digits of precision, this could lead to truncation of the least-significant digits. Now, it’s worth keeping in mind that more than 15 decimal digits of precision is incredibly rare in real world data.
My proposed fix is here: https://github.com/hibernate/hibernate-orm/pull/6613/commits/55bc38dede8429ca3d5ce8674d3b3ac97be8c576 |