This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 2325983c83fa [SPARK-45192][UI] Fix overdue lineInterpolate parameter
for graphviz edge
2325983c83fa is described below
commit 2325983c83fa84a414054060e1e8b2cc2cdd1cd1
Author: Kent Yao <[email protected]>
AuthorDate: Wed Sep 20 10:01:45 2023 +0800
[SPARK-45192][UI] Fix overdue lineInterpolate parameter for graphviz edge
### What changes were proposed in this pull request?
The `edge.lineInterpolate` no longer takes effect for drawing edges. It
shall be replaced by d3.curve
### Why are the changes needed?
trivial bugfix for ui.
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
#### Before

#### After

### Was this patch authored or co-authored using generative AI tooling?
no
Closes #42969 from yaooqinn/SPARK-45192.
Authored-by: Kent Yao <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
---
.../main/resources/org/apache/spark/ui/static/spark-dag-viz.js | 10 +++++-----
.../org/apache/spark/sql/execution/ui/static/spark-sql-viz.js | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
index 73336b9f8e0a..952ca64d9cd1 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
@@ -328,11 +328,11 @@ function preprocessGraphLayout(g, forJob) {
}
}
// Curve the edges
- var edges = g.edges();
- for (var j = 0; j < edges.length; j++) {
- var edge = g.edge(edges[j]);
- edge.lineInterpolate = "basis";
- }
+ g.edges().forEach(function (edge) {
+ g.setEdge(edge.v, edge.w, {
+ curve: d3.curveBasis
+ })
+ })
// Adjust vertical separation between nodes
if (forJob) {
g.graph().rankSep = JobPageVizConstants.rankSep;
diff --git
a/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
b/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
index a47a588f8c44..a926376f3c00 100644
---
a/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
+++
b/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
@@ -115,11 +115,11 @@ function preprocessGraphLayout(g) {
});
}
// Curve the edges
- var edges = g.edges();
- for (var j = 0; j < edges.length; j++) {
- var edge = g.edge(edges[j]);
- edge.lineInterpolate = "basis";
- }
+ g.edges().forEach(function (edge) {
+ g.setEdge(edge.v, edge.w, {
+ curve: d3.curveBasis
+ })
+ })
}
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]