alamb opened a new issue #2049:
URL: https://github.com/apache/arrow-datafusion/issues/2049


   I think this was introduced in PR 
https://github.com/apache/arrow-datafusion/pull/1959
   
   Reproducer:
   
   ```rust
       let config = SessionConfig::new()
           .create_default_catalog_and_schema(true)
           .with_information_schema(true)
           .with_default_catalog_and_schema(DEFAULT_CATALOG, DEFAULT_SCHEMA);
   
       // try and register another schema provider
       let catalog: Arc<dyn CatalogProvider> = test_catalog();
   
       let mut ctx = SessionContext::with_config(config);
       // crashes
       ctx.register_catalog(DEFAULT_CATALOG, catalog);
   ```
   
   Results in :
   ```
   warning: `rust_arrow_playground` (bin "rust_arrow_playground") generated 3 
warnings
       Finished dev [unoptimized + debuginfo] target(s) in 17.12s
        Running `/Users/alamb/Software/df-target/debug/rust_arrow_playground`
   Starting tests
   thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', 
/Users/alamb/Software/arrow-datafusion/datafusion/src/execution/context.rs:579:18
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
      1: core::panicking::panic_fmt
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
      2: core::panicking::panic
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:48:5
      3: core::option::Option<T>::unwrap
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/option.rs:729:21
      4: datafusion::execution::context::SessionContext::register_catalog
                at 
/Users/alamb/Software/arrow-datafusion/datafusion/src/execution/context.rs:576:22
      5: rust_arrow_playground::main::{{closure}}
                at ./src/main.rs:38:5
      6: <core::future::from_generator::GenFuture<T> as 
core::future::future::Future>::poll
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/future/mod.rs:84:19
      7: tokio::park::thread::CachedParkThread::block_on::{{closure}}
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:54
      8: tokio::coop::with_budget::{{closure}}
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:102:9
      9: std::thread::local::LocalKey<T>::try_with
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/thread/local.rs:412:16
     10: std::thread::local::LocalKey<T>::with
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/thread/local.rs:388:9
     11: tokio::coop::with_budget
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:95:5
     12: tokio::coop::budget
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:72:5
     13: tokio::park::thread::CachedParkThread::block_on
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:31
     14: tokio::runtime::enter::Enter::block_on
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/enter.rs:151:13
     15: tokio::runtime::thread_pool::ThreadPool::block_on
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/thread_pool/mod.rs:73:9
     16: tokio::runtime::Runtime::block_on
                at 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/mod.rs:477:43
     17: rust_arrow_playground::main
                at ./src/main.rs:44:5
     18: core::ops::function::FnOnce::call_once
                at 
/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:227:5
   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 
backtrace.
   ```
   


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