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


##########
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:
   The definition of `schema()` in table provider is to always return a schema. 
It would be a breaking change to change that to return a result, which I doubt 
provides much value. This will at least give you a empty schema which will then 
fail the later parts of the query.



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