yaooqinn opened a new pull request, #54565:
URL: https://github.com/apache/spark/pull/54565

   ### What changes were proposed in this pull request?
   
   Improve the SQL plan visualization on the execution detail page by making 
node labels compact and adding a clickable detail side panel for metrics.
   
   **Key changes:**
   - **Compact node labels**: Show only operator name as plain text (removed 
HTML `labelType` and `<b>` tags)
   - **Compact cluster labels**: Shortened from `WholeStageCodegen (1) / 
duration: total (min, med, max)...` to `(1) / 9.3s`
   - **Detail side panel** (col-4 right sidebar): Click any node to see its 
metrics in a structured table
   - **Cluster click**: Shows cluster-level metrics + all child node metrics 
grouped by operator
   - **Structured metric tables**: Uses `metricType` from server JSON to render 
Total/Min/Med/Max sub-tables (no regex parsing)
   - **Panel collapses** with Plan Visualization toggle
   - **Scrollable panel body** (`max-height: 80vh`) for large metric sets
   - **Layout tuning**: Reduced `ranksep`/`nodesep`, cluster padding via dagre 
pre-layout
   
   ### Why are the changes needed?
   
   The existing SQL plan visualization bakes all metrics into node labels, 
making them hard to read for large plans with many operators. The compact 
layout with on-demand detail panel provides a cleaner overview while keeping 
full metric details accessible.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The SQL execution detail page now shows:
   - Compact plan graph with operator names only
   - A right-side panel showing full metrics on node click
   - Cluster labels with just the codegen stage number and total duration
   
   ### How was this patch tested?
   
   - Updated `SparkPlanGraphSuite` for new label format
   - Added test for `makeNodeDetailsJson` verifying cluster prefix and children 
array
   - Manual verification with simple and complex queries (multi-way joins, 
unions, window functions)
   - Scalastyle passes
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Yes, co-authored with GitHub Copilot.


-- 
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]

Reply via email to