aweltsch commented on code in PR #7021:
URL: https://github.com/apache/arrow-rs/pull/7021#discussion_r1953821937
##########
arrow-cast/src/cast/decimal.rs:
##########
@@ -99,10 +100,24 @@ where
I::Native: DecimalCast + ArrowNativeTypeOp,
O::Native: DecimalCast + ArrowNativeTypeOp,
{
+ validate_decimal_precision_and_scale::<O>(output_precision, output_scale)?;
Review Comment:
After all the discussion I've decided to keep the validation and to put it
into the `is_infallible_branch`. To me it doesn't seem to make sense to run the
kernel if the result can not succeed. Given that the same would happen if
called through the `cast_decimal_to_decimal` function, I think we don't need
any special handling for `CastOptions.safe = true`.
--
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]