Hi James.

Like I mentioned, we need to apply re-scaling on every step in the addition. For example, if col1 + col2 + col3, and col3 happens to be a negative number. The overall addition may fits. But if col1 + col2 does not fit, the whole addition would still be invalid. Therefore, I cannot just use a overall scale and precision and set it. That was the point we reached the other day when talking to Jamie that we need to perform rescale truncate in every step. As a result, I need to store all the precision and scale in every step.

I could split the logic into individual classes. I was thinking that putting all the logics in one place make it cleaner and reduces code replication. Also, it gives us an easier place in the future to add in logics for SUM, AVG and other functions.