Skip to content

Commit

Permalink
replace deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
milenkovicm committed Nov 8, 2024
1 parent 3229367 commit f3769a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ballista/core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn default_session_builder(config: SessionConfig) -> SessionState {
.with_default_features()
.with_config(config)
.with_runtime_env(Arc::new(
RuntimeEnv::new(with_object_store_registry(RuntimeConfig::default()))
RuntimeEnv::try_new(with_object_store_registry(RuntimeConfig::default()))
.unwrap(),
))
.build()
Expand Down Expand Up @@ -268,7 +268,7 @@ pub fn create_df_ctx_with_ballista_query_planner<T: 'static + AsLogicalPlan>(
.with_default_features()
.with_config(session_config)
.with_runtime_env(Arc::new(
RuntimeEnv::new(with_object_store_registry(RuntimeConfig::default()))
RuntimeEnv::try_new(with_object_store_registry(RuntimeConfig::default()))
.unwrap(),
))
.with_query_planner(planner)
Expand Down Expand Up @@ -319,7 +319,7 @@ impl SessionStateExt for SessionState {
.with_round_robin_repartition(false);

let runtime_config = RuntimeConfig::default();
let runtime_env = RuntimeEnv::new(runtime_config)?;
let runtime_env = RuntimeEnv::try_new(runtime_config)?;
let session_state = SessionStateBuilder::new()
.with_default_features()
.with_config(session_config)
Expand Down Expand Up @@ -709,7 +709,7 @@ mod test {
use crate::utils::{LocalRun, SessionStateExt};

fn context() -> SessionContext {
let runtime_environment = RuntimeEnv::new(RuntimeConfig::new()).unwrap();
let runtime_environment = RuntimeEnv::try_new(RuntimeConfig::new()).unwrap();

let session_config = SessionConfig::new().with_information_schema(true);

Expand Down
2 changes: 1 addition & 1 deletion ballista/executor/src/executor_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub async fn start_executor_process(opt: Arc<ExecutorProcessConfig>) -> Result<(
let wd = work_dir.clone();
let runtime_producer: RuntimeProducer = Arc::new(move |_| {
let config = RuntimeConfig::new().with_temp_file_path(wd.clone());
Ok(Arc::new(RuntimeEnv::new(config)?))
Ok(Arc::new(RuntimeEnv::try_new(config)?))
});

let logical = opt
Expand Down
2 changes: 1 addition & 1 deletion ballista/executor/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub async fn new_standalone_executor<
let config = with_object_store_registry(
RuntimeConfig::new().with_temp_file_path(wd.clone()),
);
Ok(Arc::new(RuntimeEnv::new(config)?))
Ok(Arc::new(RuntimeEnv::try_new(config)?))
});

let executor = Arc::new(Executor::new_basic(
Expand Down

0 comments on commit f3769a6

Please sign in to comment.