alamb commented on code in PR #12157:
URL: https://github.com/apache/datafusion/pull/12157#discussion_r1731694770
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -212,15 +212,15 @@ where
/// # use std::sync::Arc;
/// # use datafusion::prelude::*;
/// # use datafusion::execution::SessionStateBuilder;
-/// # use datafusion_execution::runtime_env::{RuntimeConfig, RuntimeEnv};
+/// # use datafusion_execution::runtime_env::RuntimeEnvBuilder;
/// // Configure a 4k batch size
/// let config = SessionConfig::new() .with_batch_size(4 * 1024);
///
/// // configure a memory limit of 1GB with 20% slop
-/// let runtime_env = RuntimeEnv::new(
-/// RuntimeConfig::new()
+/// let runtime_env = RuntimeEnvBuilder::new()
Review Comment:
❤️
##########
datafusion/execution/src/runtime_env.rs:
##########
@@ -147,13 +147,17 @@ impl RuntimeEnv {
impl Default for RuntimeEnv {
fn default() -> Self {
- RuntimeEnv::new(RuntimeConfig::new()).unwrap()
+ RuntimeEnvBuilder::new().build().unwrap()
}
}
+/// Please see: <https://github.com/apache/datafusion/issues/12156>
+/// This is leaving a type alias for backwards compatibility.
Review Comment:
```suggestion
/// This a type alias for backwards compatibility.
```
##########
datafusion/core/tests/fuzz_cases/sort_fuzz.rs:
##########
@@ -136,9 +136,12 @@ impl SortTest {
.sort_spill_reservation_bytes,
);
- let runtime_config = RuntimeConfig::new()
- .with_memory_pool(Arc::new(GreedyMemoryPool::new(pool_size)));
- let runtime = Arc::new(RuntimeEnv::new(runtime_config).unwrap());
+ let runtime = Arc::new(
Review Comment:
as a follow on maybe we could even make a `build_arc()` type method to make
this even nicer looking
Following the model of
https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/parquet/struct.ParquetExecBuilder.html#method.build_arc
--
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]