Skip to content

[SPARK-56002][UI] Make SQL plan visualization metrics table sortable#54823

Closed
yaooqinn wants to merge 1 commit intoapache:masterfrom
yaooqinn:SPARK-56002
Closed

[SPARK-56002][UI] Make SQL plan visualization metrics table sortable#54823
yaooqinn wants to merge 1 commit intoapache:masterfrom
yaooqinn:SPARK-56002

Conversation

@yaooqinn
Copy link
Member

What changes were proposed in this pull request?

Make the metrics table in the SQL plan visualization side panel sortable by clicking column headers.

Changes (JS-only, 1 file):

  • Add sortable class to metrics tables built by buildMetricsTable()
  • Call sorttable.makeSortable() on dynamically injected tables after innerHTML update
  • Add sorttable to the global JS comment

Why are the changes needed?

When inspecting SQL plan nodes with many metrics (e.g., Exchange nodes with 20+ shuffle metrics), sorting by metric name or value helps quickly locate the most relevant metrics.

Does this PR introduce any user-facing change?

Yes — metrics table headers in the SQL plan viz side panel are now clickable to sort.

How was this patch tested?

Manual testing. JS-only change, no Scala changes.

Was this patch authored or co-authored using generative AI tooling?

Yes, co-authored with GitHub Copilot.

Add 'sortable' class to metrics tables in the SQL plan viz side panel
and call sorttable.makeSortable() after dynamic injection. Users can
now click Metric/Value column headers to sort by name or value.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dongjoon-hyun
Copy link
Member

Feel free to merge when you feel it's ready.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Mar 17, 2026

BTW, for the following one, I also used like you previously.

Yes, co-authored with GitHub Copilot.

However, let's use Generated-By: to be consistent with the Apache Spark Pull Request Template which follows ASF Guidance.

If generative AI tooling has been used in the process of authoring this patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.

https://www.apache.org/legal/generative-tooling.html

There is nothing wrong here. I just want to mention this because of just consistency and we (the Apache Spark PMC member) lead the way in the community.

@yaooqinn
Copy link
Member Author

Thank you @dongjoon-hyun for bringing this out.

For the AI-tooling, what does the version here mean? Does it mean the Copilot Cli, cursor version, or something else similar? You know, such stuffs are evolving pretty fast than traditional software (I update it nearly daily from my side:)). I think the original intention here is to add the LLM model being used, right?

@yaooqinn yaooqinn closed this in cca4a12 Mar 17, 2026
@yaooqinn yaooqinn deleted the SPARK-56002 branch March 17, 2026 09:58
@yaooqinn
Copy link
Member Author

Merged to master
For the PR desc improvement, we can proceed in new PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants