ibis
ibis copied to clipboard
fix(decimal): implement proper type derivation logic for decimal division
After https://github.com/ibis-project/ibis/pull/4330 we have an implementation of add, multiply, and sub, but we're missing division.
As part of fixing this issue, I think it'll make the implementation a lot less cluttered if we split up the arithmetic operation classes into non-decimal based implementations and decimal based ones. That way, the computation of division's output type is specialized where necessary and nowhere else.
See https://www.ibm.com/docs/en/i/7.5?topic=operators-decimal-arithmetic-in-sql for the type derivation rules.
Closed by #4330.