apache / apache/datafusion-ballista
feat: make it user configurable to display plans as tree renderer
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 320
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 66
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
job REST endpoint returns plans as single line per node:
```bash
curl -sv http://localhost:50050/api/job/8Am4heu |jq
{
"job_id": "8Am4heu",
"job_name": "",
"job_status": "Completed. Produced 1 partition containing 1 row. Elapsed time: 13125 ms.",
"status": "Completed",
"num_stages": 1,
"completed_stages": 1,
"percent_complete": 100,
"start_time": 1777541048696,
"end_time": 1777541061821,
"logical_plan": "Projection: Int64(1)\n EmptyRelation: rows=1",
"physical_plan": "ProjectionExec: expr=[1 as Int64(1)]\n PlaceholderRowExec\n",
"stage_plan": "ExecutionGraph[job_id=8Am4heu, session_id=32ab0721-562a-47fa-a420-7dcc24e59f91, available_tasks=0, is_successful=true]\n=========SuccessfulStage[stage_id=1.0, partitions=1]=========\nShuffleWriterExec: partitioning: None, metrics=[output_rows=1, input_rows=1, repart_time=1ns, write_time=1.67ms]\n ProjectionExec: expr=[1 as Int64(1)], metrics=[output_rows=1, elapsed_compute=296.83µs, output_bytes=8.0 B, output_batches=1, expr_0_eval_time=168.71µs]\n PlaceholderRowExec, metrics=[]\n"
}
```
**Describe the solution you'd like**
make it user configurable to return plans as tree renderer
`displayable(running_stage.plan.as_ref()).indent(false).to_string()) -> displayable(running_stage.plan.as_ref()).tree_render() .to_string())`
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Research direction
Start at the job REST endpoint response and trace where running_stage.plan is converted with displayable(...).indent(false).to_string(). Determine how plan rendering can be made user-configurable, then verify that the response can return the tree-rendered form when selected while preserving the existing output otherwise.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100