Skip to content

Commit f7583fe

Browse files
committed
Switch to ElkExtendedEdge
1 parent 619e3d2 commit f7583fe

File tree

1 file changed

+8
-1
lines changed
  • rust/cubesql/cubesql/egraph-debug-template/src

1 file changed

+8
-1
lines changed

rust/cubesql/cubesql/egraph-debug-template/src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,18 @@ function layout(
9797
}),
9898
);
9999

100+
// Primitive edges are deprecated in ELK, so we should use ElkExtendedEdge, that use arrays, essentially hyperedges
101+
const elkEdges = edges.map((edge) => ({
102+
id: edge.id,
103+
sources: [edge.source],
104+
targets: [edge.target],
105+
}));
106+
100107
const graph = {
101108
id: 'root',
102109
layoutOptions: layoutOptions,
103110
children: Object.keys(groupNodes).map((key) => groupNodes[key]),
104-
edges: edges,
111+
edges: elkEdges,
105112
};
106113

107114
const elk = new ELK();

0 commit comments

Comments
 (0)