Just a quick idea, how about we always resolve to BigDecimal for parameters in arithmetic expressions when
- no type inference info is available
- other operands have exact types (i.e. no Float, Double)
If other operands are of the types Float or Double, then we resolve to Double. I think this could work because thanks to coercion, we can coerce all numbers to BigDecimal. One effect of that would simply be that the result type of queries like select 1 * ?1 will be BigDecimal. |