alamb commented on code in PR #4136:
URL: https://github.com/apache/arrow-rs/pull/4136#discussion_r1180468465
##########
arrow-arith/src/arithmetic.rs:
##########
@@ -1451,27 +1559,17 @@ pub fn multiply_fixed_point_checked(
right: &PrimitiveArray<Decimal128Type>,
required_scale: i8,
) -> Result<PrimitiveArray<Decimal128Type>, ArrowError> {
- let product_scale = left.scale() + right.scale();
- let precision = min(
- left.precision() + right.precision() + 1,
- DECIMAL128_MAX_PRECISION,
- );
+ let (precision, product_scale, divisor) = get_fixed_point_info(
Review Comment:
Than you for the refactoring -- while the overall volume of code removed is
relatively low, I think the new structure makes the connection clearer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]