The precision and scale should be based on the child expressions precision and scale. Take a look at DecimalDivideExpression and the call to NumberUtil.setDecimalWidthAndScale().

@tonyhuang - can you give us some advice here, please?