Skip to content

Commit 7770d66

Browse files
committed
remove useless check
1 parent 1ed8b04 commit 7770d66

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

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

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,17 @@ export class CubeEvaluator extends CubeSymbols {
256256
}
257257

258258
private prepareHierarchies(cube: any, errorReporter: ErrorReporter): void {
259-
const uniqueHierarchyNames = new Set();
260259
if (Object.keys(cube.hierarchies).length) {
261-
cube.evaluatedHierarchies = Object.entries(cube.hierarchies).map(([name, hierarchy]) => {
262-
if (uniqueHierarchyNames.has(name)) {
263-
errorReporter.error(`Duplicate hierarchy name '${name}' in cube '${cube.name}'`);
264-
}
265-
uniqueHierarchyNames.add(name);
266-
267-
return ({
268-
name,
269-
...(typeof hierarchy === 'object' ? hierarchy : {}),
270-
levels: this.evaluateReferences(
271-
cube.name,
272-
// @ts-ignore
273-
hierarchy.levels,
274-
{ originalSorting: true }
275-
)
276-
});
277-
});
260+
cube.evaluatedHierarchies = Object.entries(cube.hierarchies).map(([name, hierarchy]) => ({
261+
name,
262+
...(typeof hierarchy === 'object' ? hierarchy : {}),
263+
levels: this.evaluateReferences(
264+
cube.name,
265+
// @ts-ignore
266+
hierarchy.levels,
267+
{ originalSorting: true }
268+
)
269+
}));
278270
}
279271

280272
if (cube.isView && (cube.includedMembers || []).length) {

0 commit comments

Comments
 (0)