Add a typed SessionConfigExt setter for ballista.execution.mode
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with the SessionConfigExt trait and the existing with_ballista_adaptive_query_planner helper to copy its pattern for the new setter and getter. The string key ballista.execution.mode and the execution_mode() parsing it feeds are the things to trace. Done means a typed setter and getter exist, ExecutionMode is re-exported from the client crate, and the snippet in docs/source/user-guide/pipelined-execution.md uses the helper.
Written by the indexing model from the issue text.
Description
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:
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:
fn with_ballista_execution_mode(self, mode: ExecutionMode) -> Self;
fn ballista_execution_mode(&self) -> ExecutionMode;
so enabling the mode becomes:
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.
- Dominant language
- Rust
- Stars
- 2.2k
- Forks
- 337
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 113
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datafusion-ballista
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
apache/datafusion-ballista#2687 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
apache/datafusion-ballista#2728 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
apache/datafusion-ballista#2727 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
apache/datafusion-ballista#2726 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
apache/datafusion-ballista#2720 ·
Maintainers usually reply within 1 day
All issues in apache/datafusion-ballista
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
quarto-dev/q2#1005 ·
Maintainers usually reply within 1 day
-
[Request]: streamtopOpenpackage-request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ScoopInstaller/Extras#19205 ·
Maintainers usually reply within 1 day
-
bug ci macos
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
laadtushar/edytlab#887 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
storytold/craft-libs#477 ·
Maintainers usually reply within 1 day