brancz commented on code in PR #8871:
URL: https://github.com/apache/arrow-rs/pull/8871#discussion_r2541320698
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -221,12 +221,34 @@ pub fn can_cast_types(from_type: &DataType, to_type:
&DataType) -> bool {
Decimal32(_, _) | Decimal64(_, _) | Decimal128(_, _) |
Decimal256(_, _),
) => true,
(Struct(from_fields), Struct(to_fields)) => {
- from_fields.len() == to_fields.len()
- && from_fields.iter().zip(to_fields.iter()).all(|(f1, f2)| {
+ // fast path, all field names are in the same order and same
number of fields
Review Comment:
indeed, good catch the order was a bit different at the start when I wrote
that comment haha
--
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]