Skip to content

Commit 51613d8

Browse files
committed
make join graph default weight 100
1 parent ceb4fa2 commit 51613d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ export class JoinGraph {
3636
private readonly cubeEvaluator: CubeEvaluator;
3737

3838
// source node -> destination node -> weight
39-
private nodes: Record<string, Record<string, 1>>;
39+
private nodes: Record<string, Record<string, number>>;
4040

4141
// source node -> destination node -> weight
42-
private undirectedNodes: Record<string, Record<string, 1>>;
42+
private undirectedNodes: Record<string, Record<string, number>>;
4343

4444
private edges: Record<string, JoinEdge>;
4545

@@ -81,7 +81,7 @@ export class JoinGraph {
8181
this.nodes = Object.fromEntries(
8282
Object.entries(grouped).map(([from, edges]) => [
8383
from,
84-
Object.fromEntries(edges.map((join) => [join.to, 1])),
84+
Object.fromEntries(edges.map((join) => [join.to, 100])),
8585
])
8686
);
8787

@@ -107,7 +107,7 @@ export class JoinGraph {
107107
this.undirectedNodes = Object.fromEntries(
108108
Object.entries(undirectedNodesGrouped).map(([to, joins]) => [
109109
to,
110-
Object.fromEntries(joins.map(join => [join.from, 1]))
110+
Object.fromEntries(joins.map(join => [join.from, 100]))
111111
])
112112
);
113113

0 commit comments

Comments
 (0)