-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade datafusion to 22 which brings arrow upgrades with it (#1249)
Both @roeap and I have upgraded to datafusion 22 and arrow 36 in this pull request. We're not yet ready to adopt arrow 37 unfortunately --------- Co-authored-by: Robert Pack <robstar.pack@gmail.com>
- Loading branch information
Showing
8 changed files
with
63 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
use datafusion::datasource::datasource::TableProviderFactory; | ||
use datafusion::execution::context::SessionContext; | ||
use datafusion::execution::context::{SessionContext, SessionState}; | ||
use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv}; | ||
use datafusion::prelude::SessionConfig; | ||
use deltalake::delta_datafusion::DeltaTableFactory; | ||
use std::collections::HashMap; | ||
use std::sync::Arc; | ||
|
||
pub fn context_with_delta_table_factory() -> SessionContext { | ||
let mut table_factories: HashMap<String, Arc<dyn TableProviderFactory>> = HashMap::new(); | ||
table_factories.insert("DELTATABLE".to_string(), Arc::new(DeltaTableFactory {})); | ||
let cfg = RuntimeConfig::new().with_table_factories(table_factories); | ||
let cfg = RuntimeConfig::new(); | ||
let env = RuntimeEnv::new(cfg).unwrap(); | ||
let ses = SessionConfig::new(); | ||
SessionContext::with_config_rt(ses, Arc::new(env)) | ||
let mut state = SessionState::with_config_rt(ses, Arc::new(env)); | ||
state | ||
.table_factories_mut() | ||
.insert("DELTATABLE".to_string(), Arc::new(DeltaTableFactory {})); | ||
SessionContext::with_state(state) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters