vegarsti commented on code in PR #8871:
URL: https://github.com/apache/arrow-rs/pull/8871#discussion_r2541300748


##########
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:
   This comment should be on line 228, I believe



-- 
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]

Reply via email to