dongjoon-hyun opened a new pull request, #59564:
URL: https://github.com/apache/spark/pull/59564

   ### What changes were proposed in this pull request?
   
   This PR aims to keep a single click handler on the stage/task checkbox 
(`#stageId-and-taskId-checkbox`) of the SQL plan visualization by replacing 
`click(...)` with `off("click.planViz").on("click.planViz", ...)`.
   
   ### Why are the changes needed?
   
   `postprocessForAdditionalMetrics()` runs on every render, including every 
`rerenderWithDetailedLabels()` added by SPARK-55785, so each call adds one more 
click handler to the checkbox. In the detailed mode, every handler re-renders 
the plan and each re-render adds another handler, so the number of re-renders 
per click doubles on every click (e.g., 2, 4, 8, ...).
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, this fixes a bug since Apache Spark 
[v4.2.0](https://github.com/apache/spark/releases/tag/v4.2.0) (2026-07-11). In 
the detailed mode, a click on the checkbox re-renders the plan only once.
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added test case. I also verified manually in a 
browser with a static copy of the plan visualization page that the re-renders 
per click changed from 2, 4, 8 to 1, 1, 1 in the detailed mode.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5


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