Skip to content

Commit

Permalink
[FEAT] Get native execution enablement from DAFT_RUNNER (#3409)
Browse files Browse the repository at this point in the history
We added a new `DAFT_RUNNER` environment variable, so we should use this
environment variable when creating the execution configuration.
  • Loading branch information
desmondcheongzx authored Nov 25, 2024
1 parent 8052de7 commit 11c46a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/daft-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ impl DaftExecutionConfig {
log::warn!("DAFT_ENABLE_NATIVE_EXECUTOR will be deprecated and removed in the future. Please switch to using DAFT_RUNNER=NATIVE instead.");
cfg.enable_native_executor = true;
}
let daft_runner_var_name = "DAFT_RUNNER";
if let Ok(val) = std::env::var(daft_runner_var_name)
&& matches!(val.trim().to_lowercase().as_str(), "native")
{
cfg.enable_native_executor = true;
}
let ray_tracing_env_var_name = "DAFT_ENABLE_RAY_TRACING";
if let Ok(val) = std::env::var(ray_tracing_env_var_name)
&& matches!(val.trim().to_lowercase().as_str(), "1" | "true")
Expand Down

0 comments on commit 11c46a9

Please sign in to comment.