fn valid_precision_and_scale(precision: u8, scale: i8) -> Result<()>
check whether precision and scale is valid