timsaucer commented on code in PR #14775:
URL: https://github.com/apache/datafusion/pull/14775#discussion_r2127291948


##########
datafusion/ffi/src/arrow_wrappers.rs:
##########
@@ -31,30 +32,37 @@ use log::error;
 #[derive(Debug, StableAbi)]
 pub struct WrappedSchema(#[sabi(unsafe_opaque_field)] pub FFI_ArrowSchema);
 
+/// Some functions are expected to always succeed, like getting the schema 
from a TableProvider.
+/// Since going through the FFI always has the potential to fail, we need to 
catch these errors,
+/// give the user a warning, and return some kind of result. In this case we 
default to an
+/// empty schema.
+#[cfg(not(tarpaulin_include))]

Review Comment:
   I think this is the best option in this case. The functions in question like 
`schema()` are expected to always work, so we need to return *something*. This 
way it will then fail in later usage and you will at least get an error in the 
terminal/error handling.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to