Skip to content

Commit 9ac45c8

Browse files
committed
remove obsolete
1 parent b3b10a1 commit 9ac45c8

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

packages/cubejs-schema-compiler/src/adapter/PreAggregations.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,32 +1401,6 @@ export class PreAggregations {
14011401
for (const j of references.joinTree.joins) {
14021402
joinsMap[j.to] = j.from;
14031403
}
1404-
1405-
// As full-path references may be passed to query options,
1406-
// it is important to sort them based on join tree order,
1407-
// because full-path names work as explicit join hints,
1408-
// and JoinGraph will take them as granted in the order of
1409-
// occurrence. But that might be incorrect for transitive-join cases.
1410-
const sortMembersByJoinTree = (members: string[]) => {
1411-
const joinOrder: Record<string, number> = {};
1412-
joinOrder[references.joinTree!.root] = 0;
1413-
for (const join of references.joinTree!.joins) {
1414-
const index = references.joinTree!.joins.indexOf(join);
1415-
joinOrder[join.to] = index + 1;
1416-
}
1417-
1418-
members.sort((a, b) => {
1419-
const cubeA = a.split('.')[0];
1420-
const cubeB = b.split('.')[0];
1421-
const orderA = joinOrder[cubeA] ?? Infinity;
1422-
const orderB = joinOrder[cubeB] ?? Infinity;
1423-
1424-
return orderA - orderB;
1425-
});
1426-
};
1427-
1428-
sortMembersByJoinTree(references.dimensions);
1429-
sortMembersByJoinTree(references.measures);
14301404
}
14311405

14321406
references.dimensions = this.buildMembersFullName(references.dimensions, joinsMap);

0 commit comments

Comments
 (0)