Skip to content

Commit 8ce2ffd

Browse files
committed
remove not needed
1 parent 00c252b commit 8ce2ffd

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -604,51 +604,6 @@ export class BaseQuery {
604604
);
605605
}
606606

607-
/**
608-
* @private
609-
* @param {Array<string>} arr
610-
* @returns {{}|any}
611-
*/
612-
buildPredecessors(arr) {
613-
if (!arr || arr.length === 0) return {};
614-
615-
const root = arr[0];
616-
617-
// the first position of each unique element
618-
const firstPos = new Map();
619-
for (let i = 0; i < arr.length; i++) {
620-
if (!firstPos.has(arr[i])) firstPos.set(arr[i], i);
621-
}
622-
623-
const result = {};
624-
625-
for (const [elem, idx] of firstPos.entries()) {
626-
if (elem === root) {
627-
result[elem] = [];
628-
} else {
629-
// finding the nearest root on the left <<
630-
const seen = new Set();
631-
const path = [];
632-
633-
for (let j = idx - 1; j >= 0; j--) {
634-
const v = arr[j];
635-
if (!seen.has(v)) {
636-
seen.add(v);
637-
path.push(v);
638-
}
639-
if (v === root) {
640-
break;
641-
}
642-
}
643-
644-
path.reverse();
645-
result[elem] = path;
646-
}
647-
}
648-
649-
return result;
650-
}
651-
652607
initUngrouped() {
653608
this.ungrouped = this.options.ungrouped;
654609
if (this.ungrouped) {

0 commit comments

Comments
 (0)