Logics for getDecimalPrecision and getDecimalScale are mostly from the equivalent methods from Derby DB 10.9.1. The logic is NOT THE SAME as what is being described on the website. We can leave it like this, and maybe switch to the logic of more authoritative implementations.