andygrove opened a new issue, #2729:
URL: https://github.com/apache/datafusion-ballista/issues/2729
**Is your feature request related to a problem or challenge?**
To use pipelined execution (#2652) from Rust today, you set the mode by its
string key:
```rust
let config = SessionConfig::new_with_ballista()
.set_str("ballista.execution.mode", "pipelined");
```
Most other Ballista session settings have a typed helper on
`SessionConfigExt`, such as `with_ballista_adaptive_query_planner(bool)`. The
execution mode doesn't have one, so you have to know the key and its string
values. This came up in review of the pipelined execution user guide
(https://github.com/apache/datafusion-ballista/pull/2713#discussion_r4427001390).
**Describe the solution you'd like**
Add a typed setter and getter to `SessionConfigExt`, following the existing
`with_ballista_*` convention:
```rust
fn with_ballista_execution_mode(self, mode: ExecutionMode) -> Self;
fn ballista_execution_mode(&self) -> ExecutionMode;
```
so enabling the mode becomes:
```rust
let config = SessionConfig::new_with_ballista()
.with_ballista_execution_mode(ExecutionMode::Pipelined);
```
`ExecutionMode` would need to be reachable from the client crate's prelude
or re-exports. The Rust snippet in
`docs/source/user-guide/pipelined-execution.md` should then switch to the
helper.
**Describe alternatives you've considered**
A dedicated constructor, `SessionConfig::new_with_ballista_pipelined()`.
That would add a constructor per mode, and it wouldn't compose with configs
built some other way. A setter matches how the other settings are exposed.
**Additional context**
The getter could also replace the scattered
`ballista_config().execution_mode()` calls that parse the string.
--
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]