timsaucer opened a new issue, #20704:
URL: https://github.com/apache/datafusion/issues/20704
### Describe the bug
Currently when we create a `FFI_Session` we get the default table options.
There is a problem in that we are silently dropping warnings that are
generated. We need to properly call `.set` on the `TableOptions`.
### To Reproduce
This is already reproduced with the existing test:
`datafusion_ffi::session::tests::test_ffi_session`
The warning is getting swallowed in the unit test. The following patch will
reproduce:
```diff
diff --git a/datafusion/ffi/src/session/mod.rs
b/datafusion/ffi/src/session/mod.rs
index aa910abb9..2191b3f88 100644
--- a/datafusion/ffi/src/session/mod.rs
+++ b/datafusion/ffi/src/session/mod.rs
@@ -563,8 +563,26 @@ mod tests {
use super::*;
+ struct FailOnWarn;
+
+ impl log::Log for FailOnWarn {
+ fn enabled(&self, metadata: &log::Metadata) -> bool {
+ metadata.level() <= log::Level::Warn
+ }
+
+ fn log(&self, record: &log::Record) {
+ if record.level() <= log::Level::Warn {
+ panic!("Test failed: warning logged: {}", record.args());
+ }
+ }
+
+ fn flush(&self) {}
+ }
+
#[tokio::test]
async fn test_ffi_session() -> Result<(), DataFusionError> {
+ log::set_logger(&FailOnWarn).unwrap();
+ log::set_max_level(log::LevelFilter::Warn);
let (ctx, task_ctx_provider) =
crate::util::tests::test_session_and_ctx();
let state = ctx.state();
let logical_codec = FFI_LogicalExtensionCodec::new(
```
### Expected behavior
If we have custom options set, they should be carried over the FFI boundary.
Instead we get the default options.
### Additional context
_No response_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]