milenkovicm opened a new pull request, #1761: URL: https://github.com/apache/datafusion-ballista/pull/1761
# Ballista plan print CLI helper ## What Adds `dev/bin/plan_print.sh`, a bash CLI utility for quickly inspecting query plans of Ballista jobs directly from the terminal, using the Ballista REST API. ## Why Inspecting a job's logical, physical, or stage plans currently requires manually assembling `curl` + `jq` pipelines and knowing which endpoint to hit. This script wraps that into a single ergonomic command, making debugging and plan analysis faster during development. ## How it works The script queries the Ballista scheduler REST API (default: `http://localhost:50050/`) and prints the requested plan for a given job. **Usage:** ``` plan_print.sh [job_id] [-a ADDR] [-p] [-l] [-e] [-s [STAGE_ID]] [-w] [-t] ``` **Options:** | Flag | Description | |------|-------------| | `job_id` | Optional. Defaults to the most recently started job (resolved via `max_by(.start_time)` from `/api/jobs`) | | `-a ADDR` | Override the API base URL (default: `http://localhost:50050/`) | | `-p` | Display `physical_plan` from job info *(default)* | | `-l` | Display `logical_plan` from job info | | `-e` | Display `stage_plan` (execution plan) from job info | | `-s [STAGE_ID]` | Display the physical plan for a specific stage, or all stages if no ID given (from `/api/job/{id}/stages`) | | `-w` | Pipe output through `less -S` (no line-wrap, horizontal scroll — useful for wide plans) | | `-t` | Request tree-rendered plans (`?render_tree=true` query parameter) | **Other details:** - The separator line dynamically fills the full terminal width (`tput cols`, falls back to 80) - API base URL is normalised to always have exactly one trailing slash - Uses `set -euo pipefail` for safe error handling ## Files changed - `dev/bin/plan_print.sh` — new file -- 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]
