alamb commented on code in PR #9007:
URL: https://github.com/apache/arrow-rs/pull/9007#discussion_r2624693873


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -1255,7 +1263,25 @@ pub fn cast_with_options(
                         let column = array.column(from_field_idx);
                         cast_with_options(column, to_field.data_type(), 
cast_options)
                     })
-                    .collect::<Result<Vec<ArrayRef>, ArrowError>>()?
+                    .collect::<Result<Vec<ArrayRef>, ArrowError>>()
+                {
+                    Ok(casted_fields) => casted_fields,
+                    Err(e) => {
+                        // If it's Field not found, we cast field by field
+                        if !e.to_string().starts_with("Field '")

Review Comment:
   This PR also may recast some columns twice



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