andygrove opened a new issue, #6724:
URL: https://github.com/apache/arrow-rs/issues/6724

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   In general, we have detailed error messages for unsupported casts, such as:
   
   ```rust
   _ => Err(ArrowError::CastError(format!(
       "Casting from {from_type:?} to {to_type:?} not supported"
   ```
   
   However, the messages for casting between struct and non-struct types does 
not provide information on the types that were attempted to be cast, making it 
harder to debug issues.
   
   ```rust
   (Struct(_), _) => Err(ArrowError::CastError(
       "Cannot cast from struct to other types except struct".to_string(),
   )),
   (_, Struct(_)) => Err(ArrowError::CastError(
       "Cannot cast to struct from other types except struct".to_string(),
   )),
   ```
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   I would like the error message to follow the same format as other 
unsupported casts:
   
   ```rust
   "Casting from {from_type:?} to {to_type:?} not supported"
   ```
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


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