Jefffrey commented on code in PR #10844:
URL: https://github.com/apache/arrow-rs/pull/10844#discussion_r3861790419


##########
arrow-array/src/ffi_stream.rs:
##########
@@ -348,9 +374,12 @@ fn get_stream_schema(stream_ptr: *mut 
FFI_ArrowArrayStream) -> Result<SchemaRef>
         let schema = Schema::try_from(&schema)?;
         Ok(Arc::new(schema))
     } else {
-        Err(ArrowError::CDataInterface(format!(
-            "Cannot get schema from input stream. Error code: {ret_code:?}"
-        )))
+        let message = format!("Cannot get schema from input stream. Error 
code: {ret_code}");
+        let message = match unsafe { producer_error(stream_ptr) } {

Review Comment:
   could we leave a small `SAFETY` comment here, just for completeness to 
ensure our unsafe usages are documented
   
   e.g.
   
   > Latest operation get_schema() returned non-zero code meaning an error has 
occured



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