tustvold commented on code in PR #2551:
URL: https://github.com/apache/arrow-rs/pull/2551#discussion_r952387572
##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -1306,10 +1306,13 @@ const fn time_unit_multiple(unit: &TimeUnit) -> i64 {
/// Cast one type of decimal array to another type of decimal array
fn cast_decimal_to_decimal<const BYTE_WIDTH1: usize, const BYTE_WIDTH2: usize>(
array: &ArrayRef,
+ input_precision: &u8,
input_scale: &u8,
output_precision: &u8,
output_scale: &u8,
) -> Result<ArrayRef> {
+ let need_validation =
Review Comment:
As far as I can tell this is the major change made by this PR, perhaps we
could just use this predicate in `with_precision_and_scale`, instead of the
current one which only takes into account precision?
This would not only reduce this PR to a one-line change, but also benefit
other callsites?
--
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]