CurtHagenlocher commented on code in PR #7062:
URL: https://github.com/apache/arrow-rs/pull/7062#discussion_r1945607875
##########
arrow-cast/src/cast/decimal.rs:
##########
@@ -464,86 +474,41 @@ where
Ok(Arc::new(result))
}
-pub(crate) fn cast_floating_point_to_decimal128<T: ArrowPrimitiveType>(
+pub(crate) fn cast_floating_point_to_decimal<T: ArrowPrimitiveType, D, M>(
array: &PrimitiveArray<T>,
precision: u8,
scale: i8,
cast_options: &CastOptions,
) -> Result<ArrayRef, ArrowError>
where
<T as ArrowPrimitiveType>::Native: AsPrimitive<f64>,
+ D: DecimalType + ArrowPrimitiveType<Native = M>,
+ M: ArrowNativeTypeOp + DecimalCast,
Review Comment:
Thanks for the feedback, @Jefffrey! I'm new to Rust and the constraint
system for generics is both exciting and not yet something I'm used to
reasoning about.
--
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]